题解 | #扑克牌大小#
扑克牌大小
https://www.nowcoder.com/practice/d290db02bacc4c40965ac31d16b1c3eb
from operator import index a=input().split('-') b=a[0].split() c=a[1].split() cards=list(map(str, range(3, 11)))+['J', 'Q', 'K','A', '2', 'joker', 'JOKER'] if 'joker JOKER' in a: print('joker JOKER') else: if len(b)==4 or len(c)==4: # 有炸 if len(b)==4 and len(c)==4 : # 都是炸 print(' '.join(c if cards.index(c[0])>cards.index(b[0]) else b)) else: # 一炸 print(' '.join(b if len(b)==4 else c)) elif len(b)!=len(c): print('ERROR') else: print(' '.join(c if cards.index(c[0])>cards.index(b[0]) else b))