forked from mAhmedSiddiki/Python_Full_Course
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path08_string_method.py
More file actions
55 lines (29 loc) · 763 Bytes
/
08_string_method.py
File metadata and controls
55 lines (29 loc) · 763 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
# ====================ς====ß==========¾===========================================
# String Method
# =============================================================================
a = " hdf "
print(a.isspace())
print(a.isdigit())
print(a.isnumeric())
print(a.istitle())
print(a.islower())
print(a.replace("Doreamon","Shinchan"))
print(a.zfill(20))
print(a.startswith("i"))
print(a.endswith("o"))
print(a.swapcase())
print(a.rpartition("my"))
print(a.splitlines(False))
print(a.rsplit("my",2))
print(a.rstrip("3ij"))
print(a.count("r"))
print(a.rjust(25,"*"))
print(a.center(25,"M"))
print(a.rfind("e"))
print(a.join("**"))
b = "ßς"
print(b.lower())
print(b.casefold())
print(a.upper())
print(a.title())
print(a.capitalize())