- casefold(): Casefold will convert capital alpha to small alpha
txt = "Hello, My Name is AKILAN"
txt2 = "I AM IRONMAN"
x = txt.casefold()
y= txt2.casefold()
print(x)
print(y)
OUTPUT
hello, my name is akilan
i am ironman
- swapcase(): swapcase will convert uppercase into lowercase and lower to upper
txt = "hello, my name is akilan"
txt2 = "I AM IRONMAN"
x = txt.swapcase()
y= txt2.swapcase()
print(x)
print(y)
output
HELLO, MY NAME IS AKILAN
i am ironman
strip()
strip will defaultly remove starting and ending white space if anything not given .lstrip()
rstrip()
isspace()
isalnum()
isnumeric()
isdigit()
Top comments (0)