What is the best way to store the cards and suits in python so that I can hold a reference to these values in another variable?
For example, if I have a list called
import collections C, H, D, S = "CLUBS", "HEARTS", "DICE", "SPADE" Card = collections.namedtuple("Card", "suit value") hand = [] hand.append(Card(C, 3)) hand.append(Card(H, "A")) hand.append(Card(D, 10)) hand.append(Card(S, "Q")) for card in hand: print(card.value, card.suit)