$ ./guess_the_language
Problem Solving — predict the output
Problem Solving — predict the output · medium · #167
What is the output?
print([n * n for n in range(4)][1:3])
[1, 4]
[0, 1]
[4, 9]
[1, 4, 9]
The squares are [0, 1, 4, 9]; the slice [1:3] takes indices 1 and 2.
Play Problem Solving ▸
◂ #166
all Problem Solving — predict the output questions
#168 ▸