I find a common thing to do is l = list() for i in some-iterator: if somefum(i) != list: l.append(somefun(i))
In other words, applying somefun to the results of the iterator return duplicates but I want the constructed list to contain none. l = [somefun(i) for i some-iterator] will produce the redundancies l = [somefun(i) for i some-iterator if somefun(i) not in l] doesn't work (not that I expected it to). Is there a more Pythonic idiom to do this than the for/if block? Thanks, Jeff _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor