我正在编写一个关于python 3.6.3的二十一点游戏,我蚂蚁指定这个:
def total(hand):
total = 0
for card in hand:
if card == "J" or card == "Q" or card == "K":
total+= 10
elif card == "A":
if total >= 11:
total+= 1
else:
total+= 11
else:
total += card
return total
但它说我有一个错误:TypeError: unsupported operand type(s) for +=: 'int' and 'tuple'
有人可以帮助我吗?