A
Ahmed Shamim
list = [ 'a', '1', 'b', '2']
what would be the logic, if I input a to get output 1.
what would be the logic, if I input a to get output 1.
2009/9/24 Ahmed Shamim said:list = [ 'a', '1', 'b', '2']
what would be the logic, if I input a to get output 1.
'1'mylist = [ 'a', '1', 'b', '2']
mydict = dict(zip(mylist[::2], mylist[1::2]))
mydict['a']
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.