Introduction
Python supports a concept called "list comprehensions". It can be used to construct lists in a very natural, easy way, like a mathematician is used to do.
List comprehension is an elegant way to define and create list in Python. These lists have often the qualities of sets, but are not in all cases sets.
Example
The following list comprehension function converts Celsius values into Fahrenheit and vice versa :-
>>> Celsius = [39.2, 36.5, 37.3, 37.8]
>>> Fahrenheit = [ ((float(9)/5)*x + 32) for x in Celsius ]
>>> print Fahrenheit
>>> [102.56, 97.700000000000003, 99.140000000000001, 100.03999999999999]