On Thu, 3 Dec 2015 10:27:19 +0100, <c.bu...@posteo.jp> wrote: [snip] > I often saw constructions like this > x for x in y if ... > But I don't understand that combination of the Python keywords (for, > in, if) I allready know. It is to complex to imagine what there really > happen.
Don't give up! List comprehensions are one of the coolest things in Python. Maybe this simple example will make it click for you: >>> [x**2 for x in [1,2,3,4] if x != 2] [1, 9, 16] -- To email me, substitute nowhere->runbox, invalid->com. -- https://mail.python.org/mailman/listinfo/python-list