title: War Carded Game Python
body: <p>I'm creating a Python card game, however, I am having difficulty on how to pull out the values out of the dictionary. I'm importing a CSV file that looks like this:</p>
  
  <pre><code>Card, Type, Value
  2, Spades, 2
  3, Spades, 3
  </code></pre>
  
  <p>I have written the following code:</p>
  
  <pre><code>import random, csv ,collections
  reader = csv.DictReader(open('deck.csv','r'))
  deckcards=[]
  for line in reader:
      deckcards.append(line)
  random.shuffle(deckcards)
  hand1=[]
  hand2=[]
  player1=[]
  player2=[]
  while len(deckcards) !=0:
      if len(deckcards) ==0:
          break
      player1.append(deckcards.pop())
      player2.append(deckcards.pop())
  def declarewar(hand1,hand2,player1,player2):
  
      hand1.append(player1.pop())
      hand2.append(player2.pop())
      return hand1,hand2,player1,player2
  print statement looks like this:
  
  [OrderedDict([('Card', 'King '), ('Type ', 'Hearts'), ('value', '13')])] 
  </code></pre>