Rudolf Adamkovič Personal site


List comprehension

A Python expression that builds a list, using the syntax

[EXPRESSION for ITEM in ITERABLE]
[EXPRESSION for ITEM in ITERABLE if CONDITION]

similar to set-builder notation.


© 2025 Rudolf Adamkovič under GNU General Public License version 3.
Made with Emacs and secret alien technologies of yesteryear.