zip(cardranks,cardsuits) will not give you a valid, normal deck after shuffling cardranks and cardsuits - you may end up with a deck that has 4 aces of spades and no aces of any other suit for example.Ī better solution would be this: # All possible ranksĭeck = list(itertools. This means that you will have to input no 52 times before the loop ends and the function returns without drawing a card.
0 Comments
Leave a Reply. |