title: generating card deck Python 3
body: <p>I am currently trying to program a (drinking) game called: Ride the bus. My problem right now doesn't necessarily lie in programming the game, but it is generating a deck of cards without any duplicates. I have looked all over this forum to find it, but the only things I found were how to generate random cards and not how to exclude duplicates. This is the code I have right now for generating cards:</p>
  
  <pre><code>    suitnum = ["spade","club","heart","diamond"]
      cardnum = [2,3,4,5,6,7,8,9,10,"jack","queen","king","ace"]
  
      suit1 = random.choice(suitnum)
      card1 = random.choice(cardnum)
  </code></pre>
  
  <p>Now, for each round in the game I generate a new card in the same way, except the suit and card name are different each round. I take the previously generated card into each round (each of which is a seperate def) because I need them. My issue right now is this code allows for duplicates to occur. I would like to find a way to basically generate a 'shuffled' deck of cards in the beginnning of the program and in each round be able to refer to that deck and take the top card of the deck. I think this would be the easiest way to deal with the problem. Does anyone have any ideas how to code this, or maybe any easier ways to solve my problem? </p>