easy +10 pts

Value at index n

Return the value at zero-based index n or None if out of range.

Implement `value_at(values: list, n: int)` returning the nth payload or `None` when `n` is invalid.

Constraints

0 ≤ list lengths ≤ 10_000 unless noted.

Example

>>> value_at(...)
# see tests
10 points ~12 min

Recent Submissions

No submissions yet — hit Run Tests to try!

Hints

Work on paper with a tiny list first.
Match the function signature exactly.
Python 3
All tests passed!
Test Results
Press Ctrl+Enter or click Run Tests to execute your code.