🌐
W3Schools
w3schools.com › python › ref_func_reversed.asp
Python reversed() Function
Remove List Duplicates Reverse a String Add Two Numbers · Python Examples Python Compiler Python Exercises Python Quiz Python Challenges Python Server Python Syllabus Python Study Plan Python Interview Q&A Python Bootcamp Python Certificate Python Training
🌐
Programiz
programiz.com › python-programming › methods › built-in › reversed
Python reversed()
country_capitals = { 'England': 'London', 'Canada': 'Ottawa', 'Germany': 'Berlin' } # access keys in reversed order # and convert it to a tuple country = tuple(reversed(country_capitals)) print(country)
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-reversed-function
Python reversed() Method - GeeksforGeeks
February 17, 2026 - It works with sequence types like lists, tuples, strings and ranges or any object that implements the __reversed__() method. Example: In this example, a list is reversed using reversed() and converted into a list for display.
🌐
Real Python
realpython.com › ref › builtin-functions › reversed
reversed() | Python’s Built-in Functions – Real Python
The .__reversed__() special method allows you to support reversed() in your custom classes. It must return an iterator over the items of the current list in reverse order. For example, say you want to iterate over a range of floating-point numbers.
🌐
Programiz
programiz.com › python-programming › methods › list › reverse
Python List reverse()
# List Reverse systems.reverse() # updated list print('Updated List:', systems)
🌐
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
🌐
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.
🌐
ThePythonGuru
thepythonguru.com › python-builtin-functions › reversed
Python reversed() function - ThePythonGuru.com
January 17, 2025 - print( reversed([44, 11, -90, 55, 3]) ) print(list(reversed([44, 11, -90, 55, 3]))) # reversing a list print( list(reversed((6, 1, 3, 9)))) # reversing a tuple print(list(reversed("hello"))) # reversing a string
🌐
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.
Find elsewhere
🌐
Python Reference
python-reference.readthedocs.io › en › latest › docs › functions › reversed.html
reversed — Python Reference (The Right Way) 0.1 documentation
>>> r = reversed([1, 2]) >>> r.next() 2 >>> r.next() 1 >>> r.next() Traceback (most recent call last): File "<interactive input>", line 1, in <module> StopIteration
🌐
Codecademy
codecademy.com › docs › python › built-in functions › reversed()
Python | Built-in Functions | reversed() | Codecademy
March 8, 2025 - Takes in an iterable object, such as a list, string, or a tuple and returns a reversed iterator object.
🌐
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.
🌐
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.
🌐
Educative
educative.io › answers › how-to-use-the-reverse-and-reversed-methods-in-python
How to use the reverse() and reversed() methods in Python
January 16, 2024 - Line 4: We call the reverse() method on the list. Line 6: We print the updated list. The slicing method works on iterables in Python and we exploit this to our advantage. However, the original list remains unchanged because a shallow copy is created in slicing.
🌐
ZetCode
zetcode.com › python › reverse
Python reverse - reversing Python sequences
The reversed built-in function returns a reverse iterator. The object's __reversed__ magic method is called by the reversed built-in to implement reverse iteration. In the first example, we reverse a Python list with the reverse method and the [::-1] operator.
🌐
Scaler
scaler.com › home › topics › reversed in python | python reversed() function
Reversed in Python | Python reversed() Function - Scaler Topics
3 weeks ago - In this example, we reversed a list with three elements and then accessed each element with the next function after accessing the 1, the last element in the reversed list. The iterator gets exhausted.
🌐
Spark By {Examples}
sparkbyexamples.com › home › python › python reversed() function with examples
Python reversed() Function with Examples - Spark By {Examples}
May 31, 2024 - The reversed() is a built-in function ... back to the iterable object you want. For example, if you want the result in the list, use the list(list_reverseiterator)....
🌐
Note.nkmk.me
note.nkmk.me › home › python
Reverse a List, String, Tuple in Python: reverse, reversed | note.nkmk.me
August 22, 2023 - Built-in Types - Mutable Sequence Types — Python 3.11.3 documentation · reverse() is a destructive process that reverses the original list in place. l = [1, 2, 3, 4, 5] l.reverse() print(l) # [5, 4, 3, 2, 1] ... Note that reverse() returns None.
🌐
Geek Python
geekpython.in › reverse-vs-reversed-in-python
Reverse Vs Reversed Function In Python - Comparison
July 5, 2022 - In the above example, we specified the string but converted it into the list before performing the reverse operation. We’ll get an error if we use the reverse() function on a string.
🌐
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