We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Lists Quiz

Answer the questions based on this code from the last assignment:

def last_work_experience(work_experiences: list[str]) -> str | None:
    if len(work_experiences) > 0:
        return work_experiences[len(work_experiences) - 1]
    return None

Looking up an item in a list by index is much faster than searching for items using iteration. O(1) vs O(n).