Answers for "list [::-1] python"

1

how to index lists in python

# Make the list
list = ['bananas', 'apples', 'watermellon']
# Print the word apples from the list
print(list[1])
Posted by: Guest on March-29-2020
-1

in python [:-1]

>>> L = range(10)
>>> L[::2]
[0, 2, 4, 6, 8]
Posted by: Guest on October-21-2020

Python Answers by Framework

Browse Popular Code Answers by Language