how to add new tuple as key in dictionary?

Ho Yeung Lee jobmattcon at gmail.com
Fri Jun 30 06:35:41 EDT 2017


I find that list can not be key in dictionary
then find tuple can be as key

but when I add new tuple as key , got error in python 2.7

groupkey = {(0,0): []}
groupkey[tuple([0,3])] = groupkey[tuple([0,3])] + [[0,1]]



More information about the Python-list mailing list