title: War Card Game Help Python
body: <p>So im trying to figure out how to play the simple game of war. And i have most of my code already typed im just having an issue with simple errors right now that I want to get past. 
  Right now im running into the error</p>
  
  <pre><code>Traceback (most recent call last):
  File "/Users/ryandaly/Desktop/THe GAME OF WAR.py", line 54, in &lt;module&gt;
  playerA = deck1.pop(random.choice(deck1))
  TypeError: 'str' object cannot be interpreted as an integer
  </code></pre>
  
  <p>Here is my full code</p>
  
  <pre><code>total = {
     'winA':0,  
     'winB':0
  }
  
  
  import random
  
  def shuffleDeck():
  
      deck = ['2','3','4','5','6','7','8','9','10','J','Q','K','A']*4
  
      random.shuffle(deck)        # Now shuffle the deck
  
      return deck
  
  def dealDecks(deck):
      global deck1
      global deck2
      deck1 = deck[:26]
      deck2 = deck[26:]
  
  
  def total(hand):
  
      values = {'2':2, '3':3, '4':4, '5':5, '6':6, '7':7, '8':8, '9':9, '1':10,
                'J':11, 'Q':12, 'K':13,'A':14}
  
  
  def war(playerA, playerB):        
      if playerA==playerB:
          print("Tie")
      elif playerA &gt; playerB:
          print("Winner:Player A")
          return 1
      else:        
          print("Winner:player B")
          return -1
  
  def process_game(playerA,playerB):
      result = game(p1c,p2c)   
      if result == -1:
          total['winB'] += 1
      else:
          total['winA'] += 1
  
  deck = shuffleDeck()
  
  dealDecks(deck)
  
  gameplay = input("Ready to play a round: ")
  
  while gameplay == 'y':
      playerA = deck1.pop(random.choice(deck1))
      playerB = deck2.pop(random.choice(deck2))
      print("Player A: {}. \nPlayer B: {}. \n".format(playerA,playerB))
      gameplay = input("Ready to play a round: ")
  
  
  if total['winA'] &gt; total['winB']:
      print("PlayerA won overall with a total of {} wins".format(total['winA']))
  else:
      print("PlayerB won overall with a total of {} wins".format(total['winB']))
  </code></pre>