linked_list
Builtin index · Collections & strings
result = linked_list()
Input: no input · Output: result
What it is
Takes no arguments.
Overloads
One call shape — this function is not overloaded.
| Code | Input | Output | Description |
result = linked_list() | no input | result — | Returns a linked_list handle: a new, empty double-ended list. |
Examples
From the documentation, and run by the build -- the output and the figure below are what the engine actually produced. Simplest first.
l = linked_list()
l.push_back(1)
l.push_back(2)
l.push_front(0)
print(l.to_vec()) # (0, 1, 2)
print(pop_front(l)) # 0 -- removes from the front
print(pop_back(l)) # 2 -- removes from the back
print(l.to_vec()) # (1) -- what's left
output
(0, 1, 2) 0 2 (1)
from collections-strings
How it works
linked_list() (§ data structures pass, 2026-09-01, that module's own doc comment for why VecDeque rather than a real boxed-node chain.
From the note above this builtin in the interpreter, where the reasoning was written down as it was built.