Python 3 教程 Python3 lower()方法

lowell · 2022-03-13 18:12:19 · 热度: 5

描述

Python lower() 方法转换字符串中所有大写字符为小写。

语法

lower()方法语法:

str.lower()

参数

  • 无。

返回值

返回将字符串中所有大写字符转换为小写后生成的字符串。

实例

以下实例展示了lower()的使用方法:

#!/usr/bin/python3

str = "Codercto EXAMPLE....WOW!!!"

print( str.lower() )

以上实例输出结果如下:

codercto example....wow!!!

查看更多 Python 字符串内建函数

猜你喜欢:
暂无回复。
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册