Test string formatting.

This commit is contained in:
Captain ALM 2022-11-30 17:19:49 +00:00
parent 1d49cde01d
commit 399ddc8ffd
Signed by: alfred
GPG Key ID: 4E4ADD02609997B1
1 changed files with 7 additions and 8 deletions

15
main.py
View File

@ -1,9 +1,8 @@
#String tests #String tests
a = " !Hello World! " a = " !{} {}! "
print(a.upper()) b = " !{1} {0}! "
print(a.lower()) c = "hello"
print(a.strip()) d = "world"
#strip(str_of_targ) print(a.format(c, d))
print(a.strip((" !"))) print(b.format(c, d))
print(a.replace("H", "J")) print(b.format(d, c, a))
print(a.split(" "))