售前咨询:400-100-2938
要将字母全部变为小写,可以使用字符串的`lower()`方法。下面是一个示例:
string = "Hello World" lowercase_string = string.lower() print(lowercase_string)
输出结果为:
hello world
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
推荐阅读:python怎么将大写字母转化为小写