newbie question about dictionnary ?

Mark Carter cartermark46 at ukmail.com
Fri Sep 5 05:09:36 EDT 2003


> for doing this I thought the dictionary was excellent but the key is a
> string while I want it
> to be the 2 points forming the edge ? How to do it ?

Good news: keys don't have to be strings. So this is perfectly valid code:
d={}
d[((1,2), (3,4))] = 'whatever'




More information about the Python-list mailing list