title: Count number of Blackjack's that occur in 100 2-card deals
body: <p>I need to count the number of times Blackjack occurs in 100 2-card deals from a 5 deck shoe. So far I have this:</p>
  
  <h1>str() - convert to string</h1>
  
  <pre><code>def str(draw):
      suits = {
          'S':'Spades',
          'H':'Hearts',
          'D':'Diamonds',
          'C':'Clubs'
          }
      cards = [
          'Ace', '2', '3', '4', '5',
          '6', '7', '8', '9', '10',
          'Jack', 'Queen', 'King'
          ]
      # create the human-readable string for the given card
      str = '{} of {}'.format(cards[draw[0]], suits[draw[1]])
      return str
  </code></pre>
  
  <h1>convert() - converts an integer (0-259; i.e, 5 decks) to a card</h1>
  
  <pre><code>#             Return list with card (0-12) and suit (S, H, D, C)
  def convert(x):
      if x &gt;= 0 and x &lt;= 51:
          card = x%13
          suit = 'SHDC'[x/13]
          return card, suit, str([card,suit])
      elif x &gt;= 52 and x &lt;= 103:
          x = x - 52
          card = x%13
          suit = 'SHDC'[x/13]
          return card, suit, str([card,suit])
      elif x &gt;= 104 and x &lt;= 155:
          x = x - 104
          card = x%13
          suit = 'SHDC'[x/13]
          return card, suit, str([card,suit])
      elif x &gt;= 156 and x &lt;= 207:
          x = x - 156
          card = x%13
          suit = 'SHDC'[x/13]
          return card, suit, str([card,suit])
      elif x &gt;= 208 and x &lt;= 259:
          x = x - 208
          card = x%13
          suit = 'SHDC'[x/13]
          return card, suit, str([card,suit])
  </code></pre>
  
  <h1>draw_n() - draws n cards without replacement from a deck</h1>
  
  <pre><code>def draw_n(n):
      from random import sample
      cards = []
      # Make sure a valid number is entered
       if n &gt;0 and n &lt;= 260:
          # Sample without replacement
          for x in sample(xrange(0,260),n):
              # Append converted card to list 'cards'
              cards.append(convert(x))
      return cards
  </code></pre>
  
  <h1>score1(hand) - Compute the score of first card in 2-card hand</h1>
  
  <pre><code>def score1(hand):
      if hand[0][0] == 0:
          val1 = 11
          return val1
      elif hand[0][0] == 1:
          val1 = 2
          return val1
      elif hand[0][0] == 2:
          val1 = 3
      return val1
  elif hand[0][0] == 3:
      val1 = 4
      return val1
  elif hand[0][0] == 4:
      val1 = 5
      return val1
  elif hand[0][0] == 5:
      val1 = 6
      return val1
  elif hand[0][0] == 6:
      val1 = 7
      return val1
  elif hand[0][0] == 7:
      val1 = 8
      return val1
  elif hand[0][0] == 8:
      val1 = 9
      return val1
  elif hand[0][0] == 9 or hand[0][0] == 10 or hand[0][0] == 11 or hand[0][0] == 12:
      val1 = 10
      return val1
  </code></pre>
  
  <h1>score2(hand) - Compute the score of second card in 2-card hand</h1>
  
  <pre><code>def score2(hand):
      if hand[1][0] == 0:
          val2 = 11
          return val2
      elif hand[1][0] == 1:
          val2 = 2
          return val2
      elif hand[1][0] == 2:
          val2 = 3
          return val2
      elif hand[1][0] == 3:
          val2 = 4
          return val2
      elif hand[1][0] == 4:
          val2 = 5
          return val2
      elif hand[1][0] == 5:
          val2 = 6
          return val2
      elif hand[1][0] == 6:
          val2 = 7
          return val2
      elif hand[1][0] == 7:
          val2 = 8
          return val2
      elif hand[1][0] == 8:
          val2 = 9
          return val2
      elif hand[1][0] == 9 or hand[1][0] == 10 or hand[1][0] == 11 or hand[1][0] == 12:
          val2 = 10
          return val2
  </code></pre>
  
  <p>I want to be able to draw 10 hands with:</p>
  
  <pre><code>hands = [draw_n(2) for i in range(100)]
  </code></pre>
  
  <p>After this, what would be the most efficient way to count the number of time blackjack occurs?</p>