Quiz: Control Flow

Test your knowledge regarding control flow instructions.

1

What is the output of the following Python code?

List1 = [1, 2, 3, 4, 5]
List2 =  [x * 2 for x in List1]
print(List2)
A)
[2, 4, 6, 8, 10]
B)
[1, 4, 9, 16, 25]
C)
[3, 5]
D)
[1, 3, 5]
Question 1 of 60 attempted

Get hands-on with 1200+ tech skills courses.