You should use a dictionary.
dic = {'a':1, 'b':2}

Use dic['a'] to get output 1.

[]s
iurisilvio



On Thu, Sep 24, 2009 at 5:31 PM, Ahmed Shamim <partha.sha...@gmail.com>wrote:

> list = [ 'a', '1', 'b', '2']
> what would be the logic, if I input a to get output 1.
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to