1#reverse=false is default and reverse=true sort in descending order
2# set
3py_set = {'e', 'a', 'u', 'o', 'i'}
4print(sorted(py_set, reverse=True))
5
6# dictionary
7py_dict = {'e': 1, 'a': 2, 'u': 3, 'o': 4, 'i': 5}
8print(sorted(py_dict, reverse=True))
9
10# frozen set
11frozen_set = frozenset(('e', 'a', 'u', 'o', 'i'))
12print(sorted(frozen_set, reverse=True))
13#output of all
14['u','o','i','e','a']
15
1# sort() will change the original list into a sorted list
2vowels = ['e', 'a', 'u', 'o', 'i']
3vowels.sort()
4# Output:
5# ['a', 'e', 'i', 'o', 'u']
6
7# sorted() will sort the list and return it while keeping the original
8sortedVowels = sorted(vowels)
9# Output:
10# ['a', 'e', 'i', 'o', 'u']
1sorted(iterable, key=None, reverse=False)
2
3type(sorted(iterable, key=None, reverse=False)) = list