It feels like a silly question, but I'm blanking on a method of converting a string to an int value, and then later on printing the actual string while it maintains the value previously assigned.
I wrote a quick example to try and explain what I'm doing; assuming there would be no equal values.
unshuffled_list = [2,3,4,5,6,7,8,9,10,'J','Q','K','A']
random.shuffle(unshuffled_list)
aDeck = []
bDeck = []
aDeck = unshuffled_list[0:26]
bDeck = unshuffled_list[26:53]
i = 0
while i <= len(aDeck):
    print("Player A: {}\nPlayer B: {}".format(aDeck[i],bDeck[i]))
    if aDeck[i] > bDeck[i]:
        print("Player A wins!\n")
    if aDeck[i] < bDeck[i]:
        print("Player B wins!\n")
    i += 1
This code breaks, no kidding, because it can't compare a string to a int, but is it possible to have this sort of print out:
Player A: 9
Player B: Q
Player B Wins!
Basically so that it prints out the actual string included in the list, but maintaining the int variable that it is assigned to.
I have gotten the piece of code to work by just using a list of int values, but for the sake of learning I wanted to know if it was possible to do so.
I also tried to mess around with the str() and int(), but didn't have any luck.


intvariable are you referring to?cardValue[aDeck[i]]tocardValue[bDeck[i]].eval().