Python 字符串 upper() 方法

實例

大寫字符串:

txt = "Hello my friends"
x = txt.upper()
print(x)

運行實例

定義和用法

upper() 方法返回一個字符串,其中所有字符均大寫。

符號和數字將被忽略。

語法

string.upper()

參數值

無參數