title: Python intercalate lists
body: <pre><code>def intercala_listas(lista1, lista2):
  
      l1 = [&quot;b&quot;, &quot;d&quot;, &quot;f&quot;, &quot;h&quot;]
      l2 = [&quot;a&quot;, &quot;c&quot;, &quot;e&quot;, &quot;g&quot;]
      assert intercala_listas(l1,l2) == ['a', 'b', 'c', 'd', 'e','f', 'g', 'h']
      assert l1 == [&quot;b&quot;, &quot;d&quot;, &quot;f&quot;, &quot;h&quot;]
      assert l2 == [&quot;a&quot;, &quot;c&quot;, &quot;e&quot;, &quot;g&quot;]
  </code></pre>
  <p>I have to make a function called <code>intercala_lista</code> which will receive two lists and return a third list which need to put the elements of the first list (<code>l1</code>) in the odd index and the elements of the second list (<code>l2</code>) at the even index, like the asserts shown.</p>
  <p>I dodn't expect a complete answer, but I need an idea of how do that.</p>
  <hr/>
  <p>I tried something like this:</p>
  <pre><code>def intercala_listas(lista1, lista2):
      lista = [8]
      for i in range(len(lista)):
          if lista[i].index%2 == 0:
              lista[i] = lista1[i]
          else:
              lista[i] = lista2[i]
          return lista
  </code></pre>
  <p>I know I'm not using index properly in this function. Is the idea ok?</p>