[Python-de] flache Liste

Falk Friedrich frodo at prima.de
Mon Jul 4 14:07:09 CEST 2005


On Montag, 4. Juli 2005 13:04, Henning.Ramm at mediapro-gmbh.de wrote:
>l = [1,2,3,4,3,2,1,2,3,5]
>[ x if x in [1,2,3] for x in l ]
[x for x in l if x in [1,2,3]]
sowas?

 -Falk