1>>> the_list = [1,2,3]
2>>> reversed_list = the_list.reverse()
3>>> list(reversed_list)
4[3,2,1]
5
6OR
7
8>>> the_list = [1,2,3]
9>>> the_list[::-1]
10[3,2,1]
1#This option produces a reversed copy of the list. Contrast this to mylist.reverse() which
2#reverses the original list
3>>> mylist
4[1, 2, 3, 4, 5]
5
6>>> mylist[::-1]
7[5, 4, 3, 2, 1]
8
1#This option reverses the original list, so a reversed copy is not made
2>>> mylist = [1, 2, 3, 4, 5]
3>>> mylist
4[1, 2, 3, 4, 5]
5
6>>> mylist.reverse()
7None
8
9>>> mylist
10[5, 4, 3, 2, 1]
11
12https://dbader.org/blog/python-reverse-list