Re: Help with dictionaries and multidimensial lists

2009-06-23 Thread Terry Reedy
Cameron Pulsford wrote: 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[

Re: Help with dictionaries and multidimensial lists

2009-06-23 Thread Cameron Pulsford
Thanks! On Tue, Jun 23, 2009 at 11:29 AM, Jaime Fernandez del Rio < jaime.f...@gmail.com> wrote: > On Tue, Jun 23, 2009 at 4:45 PM, Cameron > Pulsford wrote: > > 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 retu

Re: Help with dictionaries and multidimensial lists

2009-06-23 Thread Jaime Fernandez del Rio
On Tue, Jun 23, 2009 at 4:45 PM, Cameron Pulsford wrote: > 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 = > [

Help with dictionaries and multidimensial lists

2009-06-23 Thread Cameron Pulsford
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? --