import random
Cards = {
"Spade": ["2", "3", "4", "5", "6", "7", "8", "9", "10", "Jack", "Queen", "King", "Ace"],
"Diamond": ["2", "3", "4", "5", "6", "7", "8", "9", "10", "Jack", "Queen", "King", "Ace"],
"Club": ["2", "3", "4", "5", "6", "7", "8", "9", "10", "Jack", "Queen", "King", "Ace"],
"Heart": ["2", "3", "4", "5", "6", "7", "8", "9", "10", "Jack", "Queen", "King", "Ace"]
}
for _ in range(55):
r = random.sample(list(Cards), 1)
print(r[0])
I've tried plenty more and couldn't figure it out. I'm having problem accessing the value of the key
Something like this?
Then a random card: