I am new to python and I have been having some trouble making this card game In between also known as Acey Duecy.
I have made my deck of cards using a list with the code :
cardname = ("ACE","TWO","THREE","FOUR","FIVE","SIX","SEVEN","EIGHT","NINE","TEN","JACK","QUEEN","KING")
suit = ( "OF CLUBS","OF DIAMONDS","OF HEARTS","OF SPADES")
deck = ()
for n in range(4):
for i in range(13):
all_card = (cardname(i) + " " + suit(n))
deck.append(all_card)
After assigning a integer to the item in the list, I would like to remove the 2 cards if they are the same, but since I havent assigned them numbers and they are just strings right now the code does not work. I would also not want to have to assign each 52 cards the value manual since in my game the suits don’t matter thus its just the Ace, two, three etc.
first_card = deck(0)
second_card = deck(1)
if first_card == second_card :
print(".pop = False")
deck.pop(0)
deck.pop(0)
print(deck)
else :
print("They are not the same card")
```