发布时间:2022-06-16 09:39:48 人气:197 作者:多测师
python中可以使用lower()方法将所有大写字符转换为小写字母。
lower()方法语法:
str.lower()
返回值
返回将字符串中所有大写字符转换为小写后生成的字符串。
示例:
#!/usr/bin/python
str = "THIS IS STRING EXAMPLE....WOW!!!";
print str.lower();
运行结果:
this is string example....wow!!!
以上内容为大家介绍了python如何把字符转小写字母,希望对大家有所帮助,如果想要了解更多Python相关知识,请关注多测师。https://www.e70w.com/xwzx/