dict indexed by lists - ?

Alexander Alexander_Zatvornitskiy at p131.f3.n5025.z2.fidonet.org
Thu Feb 3 19:58:10 EST 2005


Привет All!

04 февраля 2005 в 02:47, Alexander Zatvornitskiy в своем письме к All писал:
 AZ> I'am trying to make something like this:
 AZ> CPT={ ['b0','c0']:1, ['b0','c1']:0, ['b1','c0']:3, ['b1','c1']:1 }

Thanks, I fix it - i use lists.

 AZ> and, later, modifying it like this:
 AZ>   key[2]=up.next_state()

replaced with:
k=k[:cur_idx-1]+up.next_state()+k[cur_id+1:]

 AZ>   ...
 AZ>   print CPT[key]

 AZ> Any suggestions?


 AZ> Alexander, zatv at bk.ru


Alexander, zatv at bk.ru



More information about the Python-list mailing list