title: Executing card and deck classes in python
body: <pre><code>class Card:
  RANKS = ['Ace', '2', '3', '4', '5', '6', '7', '8', '9', 'Jack', 'Queen', 'King']
  
  def __init__(self, rank, suit):
      self.suit = suit
      self.rank = rank
  
  def get_name(self):
      return Card.RANKS[self.rank - 1] + ' of ' + self.suit
  
  def equals(self, other_card):
      if self.rank == self.other_card:
          return True
      elif self.rank != self.other_card:
          return False 
  
  def greater_than(self, other_card):
      if self.rank &gt; self.other_card:
          return True
      elif self.rank &lt; self.other_card:
          return False
  
  def less_than(self, other_card):
      if self.rank &lt; self.other_card:
          return True
      elif self.rank &gt; self.other_card:
          return False 
  
  
  class Deck:
  def __init__(self):
      self.available_cards = []
      self.dealt_cards = []
      for suit in ['Hearts', 'Spades', 'Diamonds', 'Clubs']:
          for rank in range(1, 14):
              self.available_cards.append(Card(rank, suit))
  
  def shuffle(self):
      """
      Shuffles the cards in the deck.
      """
      import random
      return random.shuffle(self.available_cards)
  
  def deal_card(self):
      self.available_cards.add(Card)
      self.available_cards.remove(Card)
      self.dealt_cards.append(Card)
  
  def get_size(self):
      return len[self.available_cards]
  
  c = Card()
  print(c.available_cards)
  
  d = Deck()
  d.shuffle()
  print(d.dealt_cards)
  </code></pre>
  
  <p>So what I've done here is that I've made a Card class and a Deck class, but I'm having trouble executing it. I'm trying to test the two classes by shuffling it, and using it to deal some cards. But when I try to run it won't work. What should I do?</p>