Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

reverse list python

my_list = [1, 2, 3, 4, 5, 6]
# Reverse a list by using reverse() method -- inplace reversal
my_list.reverse()
print(my_list)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #reverse #list #python
ADD COMMENT
Topic
Name
5+3 =