- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstring.py
More file actions
Latest commit
31 lines (29 loc) · 492 Bytes
/
Copy pathstring.py
File metadata and controls
31 lines (29 loc) · 492 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
a='hello Bony'
b="Hello Bony"
c="""This is
a
multiple
line string
"""
print(a)
print(b)
print(c)
print(a[5])
print(a.lower())
print(a.upper())
print(a.capitalize())
print(a.title())
print(a.swapcase())
print(a.casefold()) # more powerful than lower()
d="Helle"
e=d.replace('e','o',1)
print(e)
print(a.count('l'))
f='23'
print(f.isdigit())
g= ["h","e","l","l","o"]
print("".join(g))
h= ["1","4","3"] # only for string er jonno
print("".join(h))
print(list(a))
print(a.split())