title: How to limit for loop to print first few element from list in python?
body: <p>How should i print the first 5 element from list using for loop in python. i created some thing is here. </p>
  
  <pre><code>x= ['a','b','c','d','e','f','g','h','i']
  for x in x:
     print x;
  </code></pre>
  
  <p>with this it just print all elements within list.but i wanted to print first 5 element from list.thanks in advance. </p>