Hrvoje Niksic wrote: > "Diez B. Roggisch" <[EMAIL PROTECTED]> writes: > >> [EMAIL PROTECTED] wrote: >> >>> John Salerno: >>>> What does everyone think about this? >>> >>> The Example 2 builds a list, that is then thrown away. It's just a >>> waste of memory (and time). >> >> No, it doesn't. > > This line: > > [new.append(c) for c in s if c not in new] > > ...throws away the list built by the comprehension itself, composed of > None values (returned by append).
Ah. You are right of course. Diez -- http://mail.python.org/mailman/listinfo/python-list