Section: Lists

Pop last item

python
python
last = items.pop()

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Lists
Append item
Append item
OpenIn sheetpythonsame section
Extend list
Extend list
OpenIn sheetpythonsame section
Insert at index
Insert at index
OpenIn sheetpythonsame section
Slice a list
Slice a list
OpenIn sheetpythonsame section
Reverse slice copy
Reverse slice copy
OpenIn sheetpythonsame section
Sort in place
Sort in place
OpenIn sheetpythonsame section