In Python 3, is a list comprehension simply syntactic sugar for a generator expression fed into the list function?
list
e.g. is the following code:
They aren't the same, list() will evaluate what ever is given to it after what is in the parentheses has finished executing, not before.
list()
The [] in python is a bit magical, it tells python to wrap what ever is inside it as a list, more like a type hint for the language.
[]