Functional append/extend
<p>The methods <code>append</code> and <code>extend</code> in Python are not functional by nature, they modify the callee and return <code>None</code>.</p>

<p>Is there an alternative way to do what these methods do and get a new list as a returned value?</p>

<p>Consider this example:</p>

<pre><code>def myfun(first, *args):
  for elem in [first].extend(args):
    print elem
</code></pre>

<p>Obviously, this won't work.</p>

<p>Is there a way to construct a new list "in place", instead of being forced to write the following?</p>

<pre><code>def myfun(first, *args):
   all_args = list(first)
   all_args.extend(args)

   for elem in all_args:
     print elem
</code></pre>

<p>Thanks.</p>
