Python3 upper()方法

Python 3 教程 · 2019-02-06 10:28:24

描述

Python upper() 方法将字符串中的小写字母转为大写字母。

语法

upper()方法语法:

str.upper()

参数

  • NA。

返回值

返回小写字母转为大写字母的字符串。

实例

以下实例展示了 upper()函数的使用方法:

#!/usr/bin/python3

str = "this is string example from codercto....wow!!!";

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

以上实例输出结果如下:

str.upper() :  THIS IS STRING EXAMPLE FROM CODERCTO....WOW!!!

点击查看所有 Python 3 教程 文章: https://codercto.com/courses/l/10.html

查看所有标签

Mobilizing Web Sites

Mobilizing Web Sites

Layon, Kristofer / 2011-12 / 266.00元

Everyone has been talking about the mobile web in recent years, and more of us are browsing the web on smartphones and similar devices than ever before. But most of what we are viewing has not yet bee......一起来看看 《Mobilizing Web Sites》 这本书的介绍吧!

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试