title: Unpacking a tuple in python and iterating over it
body: <p>I'm trying to unpack a co-ord tuple then iterate over it to blit a sprite multiple times:</p>
  
  <pre><code>def updateMap(self, playerPosition):
  
    self.x_coord, self.y_coord = playerPosition 
  
    t = Tree(self.screen)
    for x in range(self.x_coord):
      for y in range(self.y_coord):
        self.screen.fill((0,104,0))
        t.drawTree((x, y))
  </code></pre>
  
  <p>However I get the following error:</p>
  
  <pre><code>File "unnamed.py", line 26, in updateMap
    for x, y in range(self.x_coord), range(self.y_coord):
  ValueError: need more than 0 values to unpack
  </code></pre>
  
  <p>Grateful if someone can point me in the right direction on the correct way to do this.  Thanks. </p>
  
  <p>EDIT:  I have edited my code to the above to iterate over every coord say if playerPostion is 0,5 so the iteration goes (0,1) (0,2) (0,3) (0,4) (0,5) -- but although I'm not getting any errors it seems the tree does not get drawn correctly. Thanks.. it seems to be the answer, except my coding is just wrong.</p>