lift list of values to a list of lists of values
<p>Here's a tricky one.  I want to take a list of integers, and turn it into a list of lists containing that integer.  This is so that I can later append to that list.  Unfortunately <code>list()</code> does not take a single integer, so I can't <code>map</code> it to the list.</p>

<p>Here's a more concrete explanation:</p>

<p>Given,</p>

<pre><code>&gt;&gt;&gt; a = range(5)
&gt;&gt;&gt; a
[0, 1, 2, 3, 4]
</code></pre>

<p>How can I elegantly turn it into,</p>

<pre><code>[[0], [1], [2], [3], [4]]
</code></pre>

<p>I tried <code>map</code>'ing <code>list</code>:</p>

<pre><code>&gt;&gt;&gt; map(list,a)
Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
TypeError: 'int' object is not iterable
</code></pre>

<p>Same thing with <code>tuple</code>.  In fact ideally I'd be able to map the tuple or list operators, but of course that doesn't work with Python's syntax:</p>

<pre><code>&gt;&gt;&gt; map((,),a)
  File "&lt;stdin&gt;", line 1
    map((,),a)
         ^
SyntaxError: invalid syntax
</code></pre>

<p>So the only way I can come up with a solution is to define my own list constructor:</p>

<pre><code>&gt;&gt;&gt; L = lambda x: [x]
&gt;&gt;&gt; map(L,a)
[[0], [1], [2], [3], [4]]
</code></pre>

<p>That works fine, but I'm wondering if there is a more Pythonic solution.  Mostly I was just surprised to discover that <code>list(3)</code> does not give <code>[3]</code>.</p>
