[Tutor] defaultdict(set)
Dinesh B Vadhia
dineshbvadhia at hotmail.com
Fri Sep 26 01:35:06 CEST 2008
I'm using defaultdict(set) to store a dictionary d = {value : set_items} where value = integer and set_items = set() of characters and it works perfectly.
I would like to also store the length of the set ie. l = len(set_items) with the dictionary but don't how to do it using a defaultdict(). Any ideas?
Dinesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20080925/3d970551/attachment.htm>
More information about the Tutor
mailing list