Explore Library
QuizAdvanced

List vs Generator Expressions

Understanding the key difference between list comprehensions and generator expressions in Python.

What is the main difference between `[x*2 for x in range(5)]` and `(x*2 for x in range(5))`?