L
Lie
No, it doesn't. It uses append because it refers to itself in the
if-expression. So the append(c) is needed - and thus the assignment
possible but essentially useless.
Diez
Yes it does, it build a list of 'None's.
And if list.append is concerned, the example given has no use, since:
x = [c for c in cs]
is essentially the same as
x = []
[x.append(c) for c in cs]
If, you're talking about other function calls, it might be an abuse or
not depending on personal preference.