The quiz where the difficulty automagically adapts to the player's Python knowledge
This is a question page. You can use this page to bookmark a question. Start a new quiz!
x = [i for i in range(1, 10, 2)] print(x)
Generator expressions provide an additional shortcut to build generators out of expressions, similar to that of list comprehensions. In fact, a list comprehension can be turned into a generator expression by replacing the square brackets ( ) with parentheses. Alternately, lists comprehensions cam be thought of generator expressions wrapped in a list constructor. (wiki.python.org/moin/Generators)
Question difficulty: 🔵🔵🔵🔵🔵