dave <[EMAIL PROTECTED]> writes:
> if newtlist not in mapdic:
> mapdic[newtlist] = [line]
> if line not in mapdic[newtlist]:
> mapdic[newtlist].append(line)
I'd use the defaultdict module to avoid the above.
> for value in mapdic.values():
> if len(value) <= 1:
> pass
> else:
> print value
I'd write:
for value in mapdic.values():
if len(value) > 1:
print value
I'd actually use itervalues rather than values, but that's a little
bit fancy, you don't have to worry about it til later.
--
http://mail.python.org/mailman/listinfo/python-list