List comprehensions
Computer Science · Python
Loading practice question…
About this practice set
List comprehensions is part of Computer Science (Python). Questions are generated with new numbers each time you practise. Levels available: Easy. After you answer, an explanation is shown.
Example questions
A taste of what you will practise. Answers are revealed after you try.
Easy
What does this Python code print? squares = [x ** 2 for x in range(4)] print(len(squares))