$ ./guess_the_language
Problem Solving — predict the output
Problem Solving — predict the output · medium · #33
What is printed?
nums = [0, 1, 2, 3, 4] print(nums[1:4])
[1, 2, 3, 4]
[0, 1, 2, 3]
[2, 3, 4]
[1, 2, 3]
Slicing [1:4] includes indices 1, 2, 3 but not 4.
Play Problem Solving ▸
◂ #32
all Problem Solving — predict the output questions
#34 ▸