title: How do I dynamically print a table of strings in the terminal?
body: <p>I need to dynamically create a dict of dicts and then print them in a neat table in the terminal.  Eventually, i'm going to be adding to each dict and re-printing the table.</p>
  
  <p>Here's my code so far:</p>
  
  <pre><code>def handy(self, play_deck):
      a = raw_input('How many hands? ')
      for i in range(int(a)):
          h = "hand" + str(i+ 1) # dynamilly create key
          q, play_deck = self.deal(self.full_deck) # pull cards from deck
          self.dict_of_hands.setdefault(h, q) # load up dict of hands
  
      hand_keys = self.dict_of_hands.keys()
      the_hands = self.dict_of_hands
      print "\n"
      for hand in hand_keys:
          for card in range(len(the_hands[hand].keys())):
              print hand
              print the_hands[hand][card]
  </code></pre>
  
  <p>and my output is this:</p>
  
  <pre><code>How many hands? 4
  
  hand4
  6 of Clubs
  hand4
  4 of Diamonds
  hand1
  8 of Diamonds
  hand1
  10 of Hearts
  hand2
  10 of Hearts
  hand2
  5 of Clubs
  hand3
  9 of Diamonds
  hand3
  3 of Hearts
  </code></pre>
  
  <p>I'd like to have:</p>
  
  <pre><code>hand1           hand2           hand3            hand4
  2 of hearts     8 of spades     ace of clubs     jack of diomonds
  5 of diamonds   ...             ...              ...etc.
  </code></pre>
  
  <p>The examples i've seen on SO are based on a known number of columns.  This needs to be dynamic.</p>