List Comprehensions

New In Python 2.0

Syntax

[expr for iter_var in iterable]
[expr for iter_var in iterable if cond_expr]

References

[1] PEPS@Python Developer's Guide, PEP 202 -- List Comprehensions

results matching ""

    No results matching ""