W3Schools
w3schools.com › python › ref_list_reverse.asp
Python List reverse() Method
The built-in function reversed() returns a reversed iterator object. ... If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail: sales@w3schools.com · If you want to report an error, or if you want to make a suggestion, send us an e-mail: help@w3schools.com · HTML Tutorial CSS Tutorial JavaScript Tutorial How To Tutorial SQL Tutorial Python Tutorial W3.CSS Tutorial Bootstrap Tutorial PHP Tutorial Java Tutorial C++ Tutorial jQuery Tutorial
Programiz
programiz.com › python-programming › methods › list › reverse
Python List reverse()
The reverse() method doesn't return any value. It updates the existing list. # Operating System List systems = ['Windows', 'macOS', 'Linux'] print('Original List:', systems) # List Reverse systems.reverse() # updated list print('Updated List:', systems)
Videos
04:20
Python Interview Prep | Alternate Ways to Reverse a String using ...
05:49
What "reversed()" ACTUALLY Does In Python - YouTube
05:16
How To Reverse A List In Python - YouTube
10:06
How to Order Lists in Python (Visually Explained) | sort(), sorted(), ...
02:57
Using reversed to loop in reverse in Python - YouTube
02:44
20 Ways You Can Reverse List in Python - YouTube
GeeksforGeeks
geeksforgeeks.org › python › python-list-reverse
Python List Reverse() - GeeksforGeeks
April 25, 2025 - In this example, we are reversing the list of mixed data types using reverse() method. ... Another common way to reverse a list in Python is using slicing ([::-1]).
Programiz
programiz.com › python-programming › methods › built-in › reversed
Python reversed()
string = 'Python' result = reversed(string) # convert the iterator to list and print it print(list(result)) # Output: ['n', 'o', 'h', 't', 'y', 'P'] The syntax of reversed() is: reversed(iterable) The reversed() function takes a single argument. iterable - an iterable such as list, tuple, string, ...
W3Schools
w3schools.com › python › python_howto_reverse_string.asp
How to reverse a String in Python
In this particular example, the slice statement [::-1] means start at the end of the string and end at position 0, move with the step -1, negative one, which means one step backwards.
Mimo
mimo.org › glossary › python › list-reverse-method
Python List reverse() Method: Syntax, Methods, and Examples
The reverse() method does not return a new list—it returns None. If you use reverse() right after you append a value to the end of the list, you’ll see the new value appear first after reversal. When you want to modify the list directly without creating a new one. Useful in memory-sensitive contexts. Great when working with an existing list you don't need to preserve. This is a concise and elegant way to reverse a list in Python.
W3Schools
w3schools.com › python › ref_func_reversed.asp
Python reversed() Function
Python Overview Python Built-in ... File Methods Python Keywords Python Exceptions Python Glossary · Built-in Modules Random Module Requests Module Statistics Module Math Module cMath Module · Remove List Duplicates Reverse a String Add Two Numbers · Python Examples Python Compiler ...
Codecademy
codecademy.com › article › how-to-reverse-a-list-in-python
How to Reverse a List in Python | Codecademy
Learn how to reverse a list in Python using `.reverse()`, `reversed()`, slicing, the two-pointer method, loops, and recursion with examples.
DataCamp
datacamp.com › tutorial › python-reverse-list
Python Reverse List: How to Reorder Your Data | DataCamp
February 27, 2025 - However, it permanently changes the order of elements in the original list, so it's best used when the initial list is not needed in its original order. #Python Example: Reversing a list in place numbers = [1, 2, 3, 4, 5] numbers.reverse() print(numbers) #Output: [5, 4, 3, 2, 1]
Educative
educative.io › answers › how-to-use-the-reverse-and-reversed-methods-in-python
How to use the reverse() and reversed() methods in Python
Line 4: We call the slicing method on the list. Line 6: We print the updated list. The reversed() function does not reverse anything but returns an object to iterate over the elements in reverse order.
GeeksforGeeks
geeksforgeeks.org › python › python-reversing-list
Reversing a List in Python - GeeksforGeeks
For Example: Input: [10, 20, 30, 40, 50] Output: [50, 40, 30, 20, 10] Let's see other different methods to reverse a list. reverse() method reverses the elements of the list in-place and it modify the original list without creating a new list.
Published November 26, 2025
Tutorialspoint
tutorialspoint.com › python › list_reverse.htm
Python List reverse() Method
The original list is then reversed ... the reverse() method res = list1.reverse() if list1 == list2: print("The string is a palindrome") else: print("The string is not a palindrome")...
Real Python
realpython.com › reverse-string-python
Reverse Strings in Python: reversed(), Slicing, and More – Real Python
July 31, 2023 - In this example, you apply the slicing operator on greeting to create a reversed copy of it. Then you use that new reversed string to feed the loop. In this case, you’re iterating over a new reversed string, so this solution is less memory-efficient than using reversed(). If you’ve ever tried to reverse a Python list, then you know that lists have a handy method called .reverse() that reverses the underlying list in place.
Top answer 1 of 16
1735
To get a new reversed list, apply the reversed function and collect the items into a list:
>>> xs = [0, 10, 20, 40]
>>> list(reversed(xs))
[40, 20, 10, 0]
To iterate backwards through a list:
>>> xs = [0, 10, 20, 40]
>>> for x in reversed(xs):
... print(x)
40
20
10
0
2 of 16
1542
>>> xs = [0, 10, 20, 40]
>>> xs[::-1]
[40, 20, 10, 0]
Extended slice syntax is explained here. See also, documentation.
Tutorialspoint
tutorialspoint.com › python › python_reversed_function.htm
Python reversed() Function
Since the string is also a sequence object, the reversed() can be apply to it. If we reverse a string, this function will return its characters in reverse order as shown in the below Python code.
Spark By {Examples}
sparkbyexamples.com › home › python › python list.reverse() method
Python list.reverse() Method - Spark By {Examples}
May 31, 2024 - This example yields the below output. # Output: Actual List: [4, 6, 8, 10, 12] Reversed List: [12, 10, 8, 6, 4] In this article, you have learned the syntax of the reverse() method from the python list which ideally reverses the elements in the list. This function doesn’t take any parameters and returns nothing.
Real Python
realpython.com › python-reverse-list
Reverse Python Lists: Beyond .reverse() and reversed() – Real Python
June 28, 2023 - That allows you to modify numbers during the iteration. Then the loop modifies the numbers by replacing each item with its square value. As a result, numbers ends up containing square values in reverse order. ... Python lists implement a special method called .__reversed__() that enables reverse iteration.