Boris Borcic: > I'd favor the following, that I find most readable > sets = map(set,list_of_strings) > res = set(''.join(sorted(s1|s2)) for s1 in sets for s2 in sets if > len(s1^s2)==2)
I think there can be written more readable code. For my programs I usually prefer simpler code, that (if possible) even a children can understand. So I can debug, modify and improve it better & faster. Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list