#use list slicing 
a = [123,122,56,754,56]
print(a[::-1])
Answer from vijayrealdeal on Stack Overflow
๐ŸŒ
Codecademy
codecademy.com โ€บ article โ€บ how-to-reverse-a-list-in-python
How to Reverse a List in Python | Codecademy
In the first approach, reversed() is used with list() to create a new reversed list. In the second approach, reversed() is used directly in a for loop to iterate through elements in reverse order without creating a new list.
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ python-reversing-list
Reversing a List in Python - GeeksforGeeks
This method is less efficient due to repeated insertions and extra space required to store the reversed list. ... a = [1, 2, 3, 4, 5] i, j = 0, len(a) - 1 while i < j: a[i], a[j] = a[j], a[i] i += 1 j -= 1 print(a) ... Loop continues until both ...
Published ย  May 29, 2026
Discussions

python - How do I reverse a list or loop over it backwards? - Stack Overflow
How do I iterate over a list in reverse in Python? See also: How can I get a reversed copy of a list (avoid a separate statement when chaining a method after .reverse)? More on stackoverflow.com
๐ŸŒ stackoverflow.com
loops - Traverse a list in reverse order in Python - Stack Overflow
How do I traverse a list in reverse order in Python? So I can start from collection[len(collection)-1] and end in collection[0]. I also want to be able to access the loop index. More on stackoverflow.com
๐ŸŒ stackoverflow.com
Python: why can't I do reversedList = thisList.reverse() in one line? It outputs None and I'm not sure why.
Functions take inputs and return values. For example, len(something) takes as input something and returns a number. Because it returns a number, x = len(something) will set x to whatever len() returned. The reverse() function returns None. That's it, just None. Calling it changes the list that you call it on, but the function itself doesn't return anything. The reason it returns None is that you, as the caller, need to be made aware that you are not creating a new list: you're changing the original list. originalList.reverse() CHANGES the original list into the reversed list, so assigning the result of that change somewhere suggests that the programmer doesn't know this and is probably about to make a mistake. On the other hand, there's a different, built-in function with a very similar name: reversed(). That function takes as input a list and returns a new list that is reversed. You can use it like this: reversedList = reversed(thisList). This will not change thisList. There's a related important concept here around what's called "side effects." Some functions change the state of the other things, and some functions simply calculate a value from inputs without changing anything. Functions that change things are said to have "side effects," and functions that do nothing besides returning a value, and always return the same value for the same input, are called "pure" functions. reversed() is a pure function, and someList.reverse() has side effects. More on reddit.com
๐ŸŒ r/learnprogramming
8
1
September 25, 2023
How to reverse a Python list (3 methods)
Well don't forget about doing it by hand! print(list(lst[i] for i in range(-1, -len(lst)-1, -1))) More on reddit.com
๐ŸŒ r/Python
4
0
February 19, 2022
๐ŸŒ
Python Help
pythonhelp.org โ€บ python-lists โ€บ how-to-reverse-a-list-in-python-using-for-loop
Reversing a List in Python Using For Loop
October 24, 2023 - Below is an example of how you could reverse a list: # Define original list original_list = ['a', 'b', 'c'] # Reverse the list with for loop reversed_list = [] for i in range(len(original_list) -1, -1, -1): #range starts from the end and goes ...
๐ŸŒ
Mimo
mimo.org โ€บ glossary โ€บ python โ€บ list-reverse-method
Python List reverse() Method: Syntax, Methods, and Examples
This built-in tool is part of how Python efficiently walks through a list backward. The underlying name comes from the behavior of a built-in reversed mechanism, which is powered by a built-in function. When dealing with large lists and lazy evaluation. Suitable for for-loops and iterators.
๐ŸŒ
datagy
datagy.io โ€บ home โ€บ python posts โ€บ how to reverse a python list (6 ways)
How to Reverse a Python List (6 Ways) โ€ข datagy
February 15, 2023 - We will iterate over each item in our original list in the negative order. Letโ€™s take a look at what this looks like: # Reverse a Python list with a List Comprehension original_list = [1,2,3,4,5,6,7,8,9] start = len(original_list) - 1 reversed_list = [original_list[i] for i in range(start, -1, -1)] print(reversed_list) ...
๐ŸŒ
Real Python
realpython.com โ€บ python-reverse-list
Reverse Python Lists: Beyond .reverse() and reversed() โ€“ Real Python
June 28, 2023 - For example, to reverse the list represented in the diagram, you can loop over the first half of the list and swap the element at index 0 with its mirror at index -1 in the first iteration.
Find elsewhere
๐ŸŒ
Medium
geekpython.medium.com โ€บ 8-ways-to-reverse-the-elements-in-a-python-list-ad50889bdd7e
8 Ways To Reverse The Elements In A Python List | by Sachin Pal | Medium
November 25, 2022 - Python reversed() function is also used to reverse the elements inside the list. Still, instead of returning the reversed object, it returns the reversed iterator object that accesses the values of a given sequence. To access the values, you have to iterate them either by using the for loop or the next() function...
๐ŸŒ
Python Morsels
pythonmorsels.com โ€บ looping-in-reverse
Looping in reverse - Python Morsels
May 27, 2025 - If you're working with a list, ... loop that iterated over our list from the end to the beginning, we could loop over the reversed slice of that list:...
๐ŸŒ
TutorialKart
tutorialkart.com โ€บ python โ€บ python-reverse-list-using-for-loop
How to Reverse a List using For Loop in Python?
April 6, 2023 - #initialize list myList = ['apple', 'banana', 'cherry', 'mango'] #store reversed list in this reversedList = [] #reverse list using for loop for i in range(len(myList)) : reversedList.append(myList[len(myList) - i - 1]) #print lists print(f'Original List : {myList}') print(f'Reversed List : {reversedList}') ... Original List : ['apple', 'banana', 'cherry', 'mango'] Reversed List : ['mango', 'cherry', 'banana', 'apple'] ... In this Python Tutorial, we learned how to reverse a list using for loop.
๐ŸŒ
Python Guides
pythonguides.com โ€บ reverse-a-list-in-python
How to Reverse a List in Python
September 30, 2025 - Use reversed() when you need an iterator or want to keep the original intact. Use loops when youโ€™re learning Python or need more control.
๐ŸŒ
FavTutor
favtutor.com โ€บ blogs โ€บ reverse-list-python
Reverse Python List (9 Easy Ways) | FavTutor
March 30, 2022 - Create an empty list to copy the reversed elements. In the for loop, add the iterator as a list element at the beginning with the new list elements. So in that way, the list elements will be reversed.
๐ŸŒ
EyeHunts
tutorial.eyehunts.com โ€บ home โ€บ how to reverse a list in python using for loop | example code
How to reverse a list in Python using for loop | Example code
January 17, 2023 - Use that range() function in for loop and use the random access operator [] to access elements in reverse i.e. list1 = ["A", "B", "C"] for i in range(len(list1) - 1, -1, -1): print(list1[i], end= '') ... Do comment if you have any doubts or ...
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ backward-iteration-in-python
Backward iteration in Python - GeeksforGeeks
July 11, 2025 - We can use slicing slicing notation [::-1] to reverse the order of elements in an iterable. This works for lists, tuples, and strings, but not for sets or dictionaries (since they are unordered).
๐ŸŒ
Cherry Servers
cherryservers.com โ€บ home โ€บ blog โ€บ python โ€บ how to reverse a list in python (using 3 simple ways)
How to Reverse a List in Python (Using 3 Simple Ways) | Cherry Servers
November 7, 2025 - Slicing with [::-1] is suitable for small to moderate-sized lists where readability is important, despite its higher memory usage. Opt for loop-based reversal if you need to perform custom operations during the reversal process. It may be rather challenging to reverse a list in Python because of the following issues.
๐ŸŒ
Tutorial Gateway
tutorialgateway.org โ€บ python-program-to-reverse-list
Python Program to Reverse List
April 17, 2026 - Generally, we can use the Python ... it directly in the for loop or while loop, the reversed() function reads the list elements in reverse order without storing them in a variable....
๐ŸŒ
CodeLucky
codelucky.com โ€บ home โ€บ how do i reverse a list or loop over it backwards? โ€“ python guide
How do I reverse a list or loop over it backwards? - Python Guide - CodeLucky
August 30, 2025 - my_list = [1, 2, 3, 4, 5] for item in reversed(my_list): print(item, end=' ') ... Slicing with [::-1] creates a new list that is a reversed copy of the original. my_list = [1, 2, 3, 4, 5] reversed_list = my_list[::-1] print(reversed_list) ...
๐ŸŒ
JanBask Training
janbasktraining.com โ€บ community โ€บ python-python โ€บ how-do-i-reverse-a-list-or-loop-over-it-backwards
How do I reverse a list or loop over it backwards? | JanBask Training Community
June 4, 2025 - ... The reversed() function returns an iterator that yields the elements of the list in reverse order. my_list = [1, 2, 3, 4, 5] for item in reversed(my_list): print(item) This does not modify the original list.