Loading…
An IndexError occurs when accessing a list index that doesn't exist.
Fix get_last_n_items to handle cases where n > length of list.
Downloading Python… (one-time, ~10 MB)
This runs entirely in your browser and is cached for next time.
Click "Submit" to check your answer