title: Infinite loop in python from user input
body: <p>I am writing Python code counting up to the number the user provides, but I get into an infinite loop when running the code. Please note I tried commenting out lines 3 and 4 and replaced "userChoice" with a number, let's say for example 5, and it works fine.</p>
  
  <pre><code>import time
  
  print "So what number do you want me to count up to?"
  userChoice = raw_input("&gt; ")
  
  i = 0
  numbers = []
  
  while i &lt; userChoice:
      print "At the top i is %d" % i
      numbers.append(i)
  
      i = i + 1
      print "Numbers now: ", numbers
      print "At the bottom i is %d" % i
      time.sleep(1)
  
  print "The numbers: "
  
  for num in numbers:
      print num
      time.sleep(1)
  </code></pre>