发布于 1年前
Python 将字符串大小写转换
Python 将字符串转换为小写
print("Hi my name is XiaoF".lower())
# 'hi my name is xiaof'
print("Hi my name is XiaoF".casefold())
# 'hi my name is xiaof'
Python 将字符串转换为大写
print("hi my name is XiaoF".upper())
# 'HI MY NAME IS XIAOF'