#coding:uft-8
#operatin of strings

a = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
b = a.lower()
c = b.upper()
print(a,b,c)

x = "湯豆腐や, いのちのはての, うすあかり"
print(x.strip())
w = "abcd, efg"
y = w.strip()
print(y)  #?

y = x.replace("湯","木綿豆腐")
print(y)
            
実行結果