Answers for "how to reverse a list in python without using reverse function"

7

how to flip a list backwards in python

myList = [0,1,2,3,4,5]
myList.reverse()
print(myList)
#OR
print(myList[::-1])
Posted by: Guest on February-22-2020
0

how to reverse a list in python without using inbuilt function

lst = lst[-1:-(len(lst)+1):-1]
Posted by: Guest on October-22-2021

Code answers related to "how to reverse a list in python without using reverse function"

Python Answers by Framework

Browse Popular Code Answers by Language