Python: How to write for every x use x?
<pre><code>#python

list="""a 1 2 3 4 5
b 1 2 3 4 5
c 1 2 3 4 5 """


a=list.split('\n')
if a[0][0]==a:
    do something
if a[1][0]==b:
    do something
if a[2][0]==c:
    do something
</code></pre>

<p>is there an automated way for python to read the first part of each line? instead of doing the above? I'm trying to use the first str char on each line as a way for python to recognize the next action to take.</p>
