Answers for "reverse a list using slicing"

1

how to reverse a list in python

lst = [1, 2, 3]
reversed_lst = reversed(lst)
Posted by: Guest on May-31-2021
1

how to reverse a list in python

# reversing a list in Python
numbers = [1,2,3,4,5,6,7,8,9]
print(numbers[::-1])
Posted by: Guest on March-04-2021

Code answers related to "reverse a list using slicing"

Python Answers by Framework

Browse Popular Code Answers by Language