title: Difference between for items in list and for i in range (0, len(x)) in python
body: <p>I'm getting to grips with lists in python but I'm stumped when it comes to the difference in using these two functions.</p>
  
  <pre><code>def print_list(x):
      for j in range (0, len(x)):
          print x[j]
  </code></pre>
  
  <p>and </p>
  
  <pre><code>def print_list(x):
      for item in list:
          j = 0
          print x[j]
          j++
  </code></pre>
  
  <p>Can anyone explain to a beginner? Thanks!</p>