title: Why we use range(len) in for loop in python?
body: <p>I have started learning python and now learning python for loop. I am using online source to learn python. But i am little but confused about for loop. </p>
  
  <p>The output of </p>
  
  <pre><code>list = ["geeks", "for", "geeks"]
  for index in range(len(list)):
      print (list[index])
  </code></pre>
  
  <p>and </p>
  
  <pre><code>list = ["geeks", "for", "geeks"]
  for i in list:
      print(i)
  </code></pre>
  
  <p>are same then why to use range(len) method? </p>
  
  <p>Thanks in advance.</p>