title: how to append an element to a list without keeping track of the index?
body: <p>I am looking for the <a href="/questions/tagged/r" class="post-tag" title="show questions tagged &#39;r&#39;" rel="tag">r</a> equivalent of this simple code in <a href="/questions/tagged/python" class="post-tag" title="show questions tagged &#39;python&#39;" rel="tag">python</a></p>
  
  <pre><code>mylist = []
  for this in that:
    df = 1
    mylist.append(df)
  </code></pre>
  
  <p>basically just creating an empty list, and then adding the objects created within the loop to it. </p>
  
  <p>I only saw R solutions where one has to specify the index of the new element (say <code>mylist[[i]] &lt;- df</code>), thus requiring to create an index <code>i</code> in the loop.</p>
  
  <p>Is there any simpler way than that to just append after the last element.</p>