题解 | #扑克牌大小#
扑克牌大小
https://www.nowcoder.com/practice/d290db02bacc4c40965ac31d16b1c3eb
player1, player2 = input().split('-') card_values = { '3': 3, '4': 4, '5': 5, '6': 6, '7': 7, '8': 8, '9': 9, '10': 10, 'J': 11, 'Q': 12, 'K': 13, 'A': 14, '2': 15, 'joker':16, 'JOKER':17 } player11, player22 = list(player1.split(' ')), list(player2.split(' ')) if len(player11) == len(player22): if card_values[player11[0]] < card_values[player22[0]]: print(player2) else: print(player1) else: if "joker" in player11 or "JOKER" in player11 or "joker" in player22 or "JOKER" in player22: print( 'joker JOKER') else: if len(player11) == 4 or len(player22)==4 : if player11[0] == player11[1] == player11[2] == player11[3]: print(player1) elif player22[0] == player22[1] == player22[2] == player22[3]: print(player2) else: print('ERROR')