easy +10 pts

Count nodes in a linked list

Return how many values appear in the list (one per node).

Implement `list_length(values: list) -> int` where `values` holds node payloads from head to tail.

Constraints

0 ≤ list lengths ≤ 10_000 unless noted.

Example

>>> list_length(...)
# 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.