Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
20
Task/String-case/Python/string-case.py
Normal file
20
Task/String-case/Python/string-case.py
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import string
|
||||
|
||||
EXAMPLE_STRINGS = [
|
||||
"alphaBETA",
|
||||
"ação",
|
||||
"o'hare O'HARE o’hare don't",
|
||||
"Stroßbùrri",
|
||||
"ĥåçýджк",
|
||||
"DŽLjnj",
|
||||
]
|
||||
|
||||
for s in EXAMPLE_STRINGS:
|
||||
print(f"original : {s}")
|
||||
print(f"upper : {s.upper()}")
|
||||
print(f"lower : {s.lower()}")
|
||||
print(f"capitalize : {s.capitalize()}")
|
||||
print(f"title : {s.title()}")
|
||||
print(f"swapcase : {s.swapcase()}")
|
||||
print(f"casefold : {s.casefold()}")
|
||||
print(f"string.capwords : {string.capwords(s, sep=None)}\n")
|
||||
Loading…
Add table
Add a link
Reference in a new issue