title: Get multiple strings from array indices - PYTHON
body: <p>I just can not figure it out how to easily do it in python:</p>
  
  <pre><code>myArray = ["this ","is ","a ","test.","this ","is ","another ","test."]
  </code></pre>
  
  <p>now I want the output to be</p>
  
  <ol>
  <li><code>print(myArray[0:3]) -&gt; "this is a test"</code></li>
  <li><code>print(myArray[4:7]) -&gt; "this is another test"</code></li>
  </ol>
  
  <p>Is there a feature in python that allows this without iterating over the whole array within a for word in myArray ...</p>
  
  <p>What I get is an index in a loop which only tells me up to which word I should "print" it.</p>
  
  <p>I prefer a python "exclusive" variant, which is short and simple, best case a one liner and it should need as less memory as possible (fast even for thousands of attempts)</p>