To compare cards without the consideration of the suit
I've created this deck and the game is able to get a card for the computer and another one for the player, but when I want to compare the values, the program considers that the suits are in order too. So, my question is How I manage to put an order to only consider the number and not the suit? import random numbers=[2,3,4,5,6,7,"Jack","Queen","King","Ace"] suits=["Hearts","Diamonds","Clubs","Spades"] deck=[] for i in suits: for j in numbers: card="{} of {}".format(j,i) deck.append(card) random.shuffle(deck) points_machine=0 points_human=0 card_machine=deck.pop() print ("The machine has", card_machine) card_human=deck.pop() print ("The player has", card_human) if card_machine>card_human: print ("The computer wins") points_machine=points_machine+1 print ("The computer has this punctuation:",points_machine)