简单类型 / 字符串

str_v = "Lower And Upper"

lower = str_v.lower()
# lower is 'lower and upper'

upper = str_v.upper()
# upper is 'LOWER AND UPPER'

capitalize = str_v.capitalize()
# capitalize is 'Lower and upper'

swap_case = str_v.swapcase()
# swap_case is 'lOWER aND uPPER'

print(f"lower is '{lower}'")
print(f"upper is '{upper}'")
print(f"capitalize is '{capitalize}'")
print(f"swap_case is '{swap_case}'")