Python

List Comprehensions

[ thing (optionally with operation) for thing in the_list ]

Example:

  lc = [ item + 1 for item in [1,2,3] ]
Links to this page