Answers for "how to do the reverse of a list in python"

2

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)
Posted by: Guest on March-06-2021

Code answers related to "how to do the reverse of a list in python"

Python Answers by Framework

Browse Popular Code Answers by Language