$ ./guess_the_language
Problem Solving — predict the output
Problem Solving — predict the output · hard · #215
What is the output?
a = [1, 2, 3] for x in a: a.remove(x) print(a)
[]
[3]
[1, 3]
[2]
Removing 1 shifts 2 into index 0, so the loop skips it, removes 3, and stops.
Play Problem Solving ▸
◂ #214
all Problem Solving — predict the output questions
#216 ▸