List comprehensions are written in square brackets because they are ultimately a way to construct a new list.
Now, this is the reason that I was not able to invoke print on the list comprehension variable. print and any such method doesn't return back the value and list comprehension needs a value to form list.
This also means I could invoke other methods which return some value to fill in the new list created by list comprehension.
Share this highlighthttp://www.safaribooksonline.com/a/learning-python-5th/31900/