print the first item in list of lists
<p>I am trying to print the first item in a list of lists.  This is what I have:</p>

<p>My list is like this:</p>

<pre><code>['32 2 6 6', '31 31 31 6', '31 2 6 6']
</code></pre>

<p>My code is:</p>

<pre><code>from operator import itemgetter

contents = []
first_item = list(map(itemgetter(0), contents))
print first_item
</code></pre>

<p>but itemgetter only returns:
['3', '3', '3'] istead of ['32', '31', '31']
can I use a delimiter?</p>

<pre><code>&gt;&gt;&gt; items = ['32 2 6 6', '31 31 31 6', '31 2 6 6']
&gt;&gt;&gt; [s.partition(' ')[0] for s in items]
['32', '31', '31']
</code></pre>

python list