发布时间:2022-08-25 09:47:58 人气:214 作者:多测师
Python upper() 方法将字符串中的小写字母转为大写字母。
upper()方法语法:
str.upper()
参数
NA。
返回值
返回小写字母转为大写字母的字符串。
实例
以下实例展示了 upper()函数的使用方法:
str = "this is string example....wow!!!";
print "str.upper() : ", str.upper()
输出结果
str.upper() : THIS IS STRING EXAMPLE....WOW!!!
以上内容为大家介绍了python培训之upper函数怎么用,希望对大家有所帮助,如果想要了解更多Python相关知识,请关注多测师。https://www.e70w.com/xwzx/