Python 字符串 upper() 方法
定义和用法
upper() 方法返回一个字符串,其中所有字符均大写。
符号和数字将被忽略。
实例
大写字符串:
txt = "Hello my friends" x = txt.upper() print(x)
语法
string.upper()
参数值
无参数。
upper() 方法返回一个字符串,其中所有字符均大写。
符号和数字将被忽略。
大写字符串:
txt = "Hello my friends" x = txt.upper() print(x)
string.upper()
无参数。