Answers for "python list access last element"

1

python list except last element

>>> myList = list(range(1,5))
>>> myList
[1, 2, 3, 4]
>>> myList = myList[:-1]
>>> myList
[1, 2, 3]
Posted by: Guest on September-23-2020

Code answers related to "python list access last element"

Python Answers by Framework

Browse Popular Code Answers by Language