Accessing tuple values
How to access the value of a and b in the following
>> t=[]
>> t.append(("a" , 1))
>> t.append(("b" , 2))
>> print t[0][0]
a
>> print t[1][0]
b
How to print the values of a and b
Just do
But of course if you really want to look up for a or b, this is not the best construct, then you need a dict: