-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPractice(31-3-17).py
28 lines (27 loc) · 927 Bytes
/
Practice(31-3-17).py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
cars = ['bmw','audi','toyota','subaru']
print("---------------------------------------")
print("Permenent Sorted function in memory")
print("---------------------------------------")
cars.sort(reverse=False)
print(cars)
cars.sort(reverse=True)
print(cars)
print("---------------------------------------")
print("Temporary Sorting Functions")
print("---------------------------------------")
print(sorted(cars))
print("---------------------------------------")
print(cars)
cars.reverse()
print(cars)
print(len(cars))
print("----------------------Excercise--3.8--------------------------")
locations = ["USA",'Australia',"Canada",'Turkey',"Misar"]
print(locations)
print("------------------Sorted list-----------------")
print(sorted(locations))
print("------------------Original list-----------------")
print(locations)
print("------------------Sorted in a Reversed list-----------------")
locations.reverse()
print(locations)