Review Note

Last Update: 05/03/2024 09:06 PM

Current Deck: Python::Python - Pythonic

Published

Currently Published Content


Front
How to slice all elements from a sequence except the first and last?
l = [12, - 23, -55, -88, -19, 45]
Back
l[1:-1]
[-23,- 55, -88, -19]

Current Tags:

python

Pending Suggestions


No pending suggestions for this note.