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# there are two types of lists
2# returns new list
3sorted(list_name, reverse=True)
4
5# changes list in place
6list_name.sort(reverse=True)
1#1 Changes list
2list.sort(reverse=True)
3#2 Returns sorted list
4sorted(list, reverse=True)
1languages = ['C++', 'Python', 'Scratch']
2#Method1:
3languages.reverse()
4print(languages)
5#Method2:
6lang = languages[::-1]
7print(lang)