hard +35 pts

Drop the tail node

Return a new list without the last node.

Implement `drop_tail(values: list) -> list` removing the tail node from a copy. Constraints: 0 ≤ list lengths ≤ 10_000 unless noted.

Constraints

0 ≤ list lengths ≤ 10_000 unless noted.

Example

>>> drop_tail(...)
# see tests
35 points ~30 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.