title: How to print two elements from an iterate list in python
body: <pre><code>x = [&quot;a&quot;,&quot;b&quot;,&quot;c&quot;,&quot;d&quot;,&quot;e&quot;]
  
  for a in range(len(x)-1):
      print(x[a],x[a+1])
  </code></pre>
  <p>output is :</p>
  <pre><code>a b
  b c
  c d
  d e
  </code></pre>
  <p>but I want results like this :</p>
  <pre><code>a b
  c d
  e
  </code></pre>
  <p>please help me what should i do with the looping</p>