Skip to content

Latest commit

 

History

History
5 lines (3 loc) · 212 Bytes

reverse_list_in_python.md

File metadata and controls

5 lines (3 loc) · 212 Bytes

Reverse List in Python

To reverse the list in python use [::-1].

  • for e.g if list is a = [1,2,3], so to reverse it you can do a = a[::-1]. It will reverse the list and store back to the variable a.