O'Reilly logo
  • Sanjay Machetti thinks this is interesting:

return rank_value * len(suit_values) + suit_values[card.suit]

From

Cover of Fluent Python

Note

formula incorrect. correct formula: (13 * suit_values[card.suit]) + rank_value