-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAssignment1.py
More file actions
28 lines (20 loc) · 802 Bytes
/
Assignment1.py
File metadata and controls
28 lines (20 loc) · 802 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
# Program of Joining of two strings together
a="Amit"
b="Sain"
c=a+" "+b
print(c)
print(a.lower()) # Program of converting of strings in lower case
print(b.lower())
print(len(a)) # Program of finding length of a string
print(len(b))
st=" Hello LIET " # Program of removing Space from left of a string
st.lstrip()
print(st)
st.rstrip() # Program of removing Space from left of a string
print(st)
#Difference between append and insert with the help of program
lst= ["google","microsoft","infosis"] # By the help of insert we can add value in a list at any position
lst.insert(1,"tesla")
print(lst)
lst.append("IOS") # Append adds values is the next to the end value
print(lst)