温馨提示×

python使用lower函数将字符串中的大小字符转换为小写

养鱼的猫咪
268
2021-03-16 14:27:10
栏目: 编程语言
Python开发者专用服务器限时活动,0元免费领,库存有限,领完即止! 点击查看>>

python使用lower函数将字符串中的大小字符转换为小写

在python中使用lower()函数将字符串中大小字符转换为小写的方法

lower:lower()函数的作用是转换字符串中所有大写字符为小写。

lower()函数语法:

str.lower()

lower()函数使用方法:

str = "HELLO WORLD !!";

print str.lower();

输出结果为:

hello world !!

亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>

推荐阅读:php lower如何转换字符串大小写

0