

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 6
click for more info
Not enough gems
Cost: 6 gems
1: Introduction to Data Structures
incomplete
2: What Are Data Structures?
incomplete
3: Lists
incomplete
4: Lists Quiz
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
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).