Course
Simulator
More
Premium
Log in
Python Function Reference
Functions
reverse
reverse
Reverse the elements of the list in place.
Python 3.13
1
list
.
reverse
(
)
Examples
Python 3.13
1
2
a
=
[
1
,
2
,
3
]
a
.
reverse
(
)
[3, 2, 1]