-1
for x in ['Q','a' ,'K']:
if x =='Q' or 'J':
x = 10
print x
我必須做一個二十一點遊戲,但我有for循環的問題。 if語句屢試不爽X不是==來「a」和它打印出10BlackJack遊戲循環
這是方法:
def count_card(self):
for num in self.player_card:
if num ==('K' or 'Q'or 'J'):
num = 10
self.player_card += num
return self.player_card