$ ./guess_the_languageProblem Solving — fill the blank
Problem Solving — fill the blank · easy · #281

What goes in the blank?

# last item of a Python list
last = items[____]

Answer: -1 (also accepted: -1, len(items)-1, len(items) - 1)

Python lists accept negative indices; -1 is the final element.
Play Problem Solving ▸