Initial commit: Python learning project with examples and exercises
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
from math import*
|
||||
|
||||
print(str.lower('ABC'))
|
||||
print(str.upper('abc'))
|
||||
print(str.islower('abc'))
|
||||
print(str.isprintable('abc'))
|
||||
print(str.isnumeric('abc'))
|
||||
print(str.isspace(' '))
|
||||
s = "Hello, world!"
|
||||
print(s.endswith("Hello", 0, 5))
|
||||
print(s.startswith("Hello"))
|
||||
a = "a,b,c"
|
||||
print(a.split(",",1))
|
||||
print(a.count("a",4))
|
||||
print(a.replace("a", "c",2))
|
||||
print(s.center(20, '*'))
|
||||
b = "123"
|
||||
print(s.zfill(7))
|
||||
print(",".join(a))
|
||||
Reference in New Issue
Block a user