Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to reverse a list in python

list = [1,2,3,4,5]
reversed_list = list[::-1] # [::-1] [start : stop : step]
print(reversed_list)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #reverse #list #python
ADD COMMENT
Topic
Name
3+2 =