title: Why does my for loop run more times than I specify?
body: <p>I expect this to give me back 9 keys from the stats dictionary, but instead I get 27. Why does this happen and how do I achieve the result I was trying to get?</p>
  
  <pre><code>import random
  
  def statsGen():
      "Will generate an npc's stats"
  
      level = 3    
      const = random.randint(1, 20)
      str = random.randint(1, 20)
      dext = random.randint(1, 20)
      perc = random.randint(1, 20)
      intel = random.randint(1, 20)
      will = random.randint(1, 20)
      char = random.randint(1, 20)
      sp = random.randint(1, 20)
      luck = random.randint(1, 20)
  
      stats = {'Const':const,'Str':str,'Dext':dext,'Perc':perc,'Int':intel,'Will':will,'Char':char,'Sp':sp,'Luck':luck}
  
      for level in stats:
          stat1 = random.choice(list(stats))
          print(stat1)
          stat2 = random.choice(list(stats))
          print(stat2)
          stat3 = random.choice(list(stats))
          print(stat3)
  
  
  statsGen()
  </code></pre>