-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathworkbook.py
More file actions
56 lines (38 loc) · 823 Bytes
/
Copy pathworkbook.py
File metadata and controls
56 lines (38 loc) · 823 Bytes
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
"""
lenth=len("Enter the first number")
print(lenth)
print("hi")
String = "Aromal "
print(String[0])
String2 = "is the class rep"
String+= String2
print(String[0:3])
x = "Aromal and Tom and Blesson is part of the Class Rep Gang"
#spl = x.split()
#fin = x.find('Blesson')
finde=x.strip(" Aromal ")
print(finde)
#print(ret)
#To reverse a string using the slice function
x = "Blesson" [::-1]
print(x)
list = ["Aswin MS", "Tom Sibus", "Alan Joy", "Nikki Tom","Nikki Tom", "Small Elephant"]
#r=set(list)
"""
"""
r=enumerate(list)
for i, word in r:
print(i,word)
x=sorted(list,reverse=True)
x=sorted(list,key=len)
print(x)
"""
#Program to read a list of names and sort in alphabetic order
#Program to remove all duplicates form a list
n=2
switcher = {
1:10,
2:20
}
val=switcher.get(n)
print(val)