title: Join every 3 lines together Python
body: <p>I currently have a list stored in a variable for example:</p>
  
  <ul>
  <li>01/01/2015 </li>
  <li>13:22</li>
  <li>Steak</li>
  <li>01/02/2015</li>
  <li>13:23</li>
  <li>Fries</li>
  <li>01/03/2015</li>
  <li>13:23</li>
  <li>Salad</li>
  </ul>
  
  <p>I have a variable z that holds this information.</p>
  
  <p>I want to join every 3 lines together so the output is date + time + order in one line. I tried the below but this puts 3 letters on each line rather than the 3 lines</p>
  
  <pre><code>threelines = range(0,len(z),3)
  for num, line in enumerate(z):
      if num in threelines:
          print ' '.join(z[num:num+3])
  </code></pre>
  
  <p>Any help would be appreciated!</p>