You should use a dictionary.<div><br></div><div>dic = {'a':1, 'b':2}</div><div><br></div><div>Use dic['a'] to get output 1.</div><div><br></div><div>[]s</div><div>iurisilvio</div><div><br><div><br><br>

<div class="gmail_quote">On Thu, Sep 24, 2009 at 5:31 PM, Ahmed Shamim <span dir="ltr"><<a href="mailto:partha.shamim@gmail.com">partha.shamim@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

list = [ 'a', '1', 'b', '2']<br>
what would be the logic, if I input a to get output 1.<br>
<font color="#888888">--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</font></blockquote></div><br></div></div>