'int' object not iterable
问题 i've been trying to get the sum of list that changed its values from a string to int using a function player_hand = [] def card_type(player_hand): card_value = 0 if player_hand[0] == 'A': card_value = 11 if player_hand[0] == 'J': card_value = 10 if player_hand[0] == 'Q': card_value = 10 if player_hand[0] == 'K': card_value = 10 if player_hand[0] == '2': card_value = 2 if player_hand[0] == '3': card_value = 3 if player_hand[0] == '4': card_value = 4 if player_hand[0] == '5': card_value = 5 if