card_value = 'J':11
print(card_value(x),'ack')
print(card_value(y)-11)
Basically I am making poker and don’t know how to deal with the J-Ace having their own numbers , while using the value to figure out types of hands.
card_value = 'J':11
print(card_value(x),'ack')
print(card_value(y)-11)
Basically I am making poker and don’t know how to deal with the J-Ace having their own numbers , while using the value to figure out types of hands.
Use a dictionary :
my_dict = {'J':11, 'A':10}
Then you can retrieve the value :
>> my_dict['J']
>> 11