I am trying to make a deck of cards for my beginner Python class, and this is the code I have so far:
import random
import itertools
class Card:
def _init_(self, value, suit):
self.value = value
self.suit = suit
value = ['Ace', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'Jack','Queen', 'King']
suit = ['Spades', 'Diamonds', 'Hearts', 'Clubs']
What I intend to do (and what I think it's doing), is using the "values" and "suits" to create 52 different possible combinations, like a real deck of cards. Now, I just want to print a list of all of these 52 combinations. So I have three questions:
- Is all of this correct so far?
- How can I print a list of these cards?
- Is it possible to have two different lists that are changeable (for example, be able to draw a new card into a deck/play a card)?