Python lower() 方法:将字符串转换为小写
lower()是Python中的字符串方法,用于将字符串中的所有字母转换为小写字母。它不会修改原始字符串,而是返回一个新的字符串。
例如:
string = 'Hello World'
lower_string = string.lower()
print(lower_string)
输出:
hello world
原文地址: https://www.cveoy.top/t/topic/qvpY 著作权归作者所有。请勿转载和采集!