Create a dictionary in python which is indexed by lists.

Posted by Chris on Stack Overflow See other posts from Stack Overflow or by Chris
Published on 2010-04-19T21:59:06Z Indexed on 2010/04/19 22:03 UTC
Read the original article Hit count: 316

Filed under:
|

I would like to create a dictionary which is indexed by lists. For instance, my dictionary should look like:

D = {[1,2,3]:1, [2,3]:3}

Anyone know how to do this? If I just type D([1,2,3]) = 1 it returns an error.

© Stack Overflow or respective owner

Related posts about python

Related posts about dictionary