$ ./guess_the_languageProblem Solving — predict the output
Problem Solving — predict the output · hard · #149

What is printed?

print([1, 2, 3][::-1])
  1. [3, 2, 1]
  2. [1, 2, 3]
  3. [3, 2]
  4. [1, 2]
A step of -1 walks the list backwards, returning a reversed copy.
Play Problem Solving ▸