title: Python: For loop not working
body: <p>Why is the for loop not working?</p>
  
  <pre><code>l=[1,2,3,4,5]
  def times(x):
      for i in len(x):
          x[i]+=10
  times(l)
  print l
  </code></pre>
  
  <p>Ideally it should print the elements of the list incremented by 10. But it is giving me the following error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "ex1.py", line 5, in &lt;module&gt;
      times(l)
    File "ex1.py", line 3, in times
      for i in len(x):
  TypeError: 'int' object is not iterable
  </code></pre>
  
  <p>Where am I going wrong?</p>