Help with dictionaries and multidimensial lists

Cameron Pulsford cameron.pulsford at gmail.com
Tue Jun 23 10:45:33 EDT 2009


Hey all, I have a dictionary that looks like this (small example version)
{(1, 2): 0} named a

so I can do a[1,2] which returns 0. What I also have is a list of
coordinates into a 2 dimensional array that might look like this b =
[[1,2]]. Is there anyway I can call a[b[0]] and have it return 0?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090623/1bd8417b/attachment.html>


More information about the Python-list mailing list