PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#sirt method
cars = ['bmw', 'audi', 'toyota', 'subaru']
print("Here is the original list:")
print(cars)
print("Here is list in alpabetic order:")
cars.sort()
print(cars)
print("Here is from the end of alphabetic order list:")
cars.sort(reverse=True)
print(cars)
#sorted function
print("\n")
cars = ['bmw', 'audi', 'toyota', 'subaru']
print(sorted(cars))
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run