温馨提示×

python中如何使用upper函数

九三
320
2021-01-30 12:36:32
栏目: 编程语言
Python开发者专用服务器限时活动,0元免费领,库存有限,领完即止! 点击查看>>

python中如何使用upper函数

在python中使用upper函数的方法

upper:upper()函数的作用是将字符串中的小写字母转为大写字母。

upper()函数语法:

str.upper()

upper()函数使用方法:

str = "hello world";

print "str.upper() : ", str.upper()

输出结果为:

str.upper() : HELLO WORLD

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

推荐阅读:python upper函数怎么使用

0