def value_of_symbol(symbol): 
  """Return an integer representing the "rank" of a card's symbol.

  For instance, '2' maps to 2, and 'J' maps to 11.

  Consecutive cards have consecutive integers."""
  if symbol in '23456789':
    return int(symbol)
  else:
    return ({
        'T': 10,
        'J': 11,
        'Q': 12,
        'K': 13,
        'A': 14
      })[symbol]