()メソッドを大文字のpython3
説明
Pythonは大文字に)(文字列の最初の文字を大文字、他の文字が変更小文字。
文法
()メソッドの構文を大文字:
str.capitalize()
パラメータ
- なし。
戻り値
このメソッドは、大文字に文字列を返します。
例
次の例では、大文字()メソッドの例を示します。
#!/usr/bin/python3 str = "this is string example from w3big....wow!!!" print ("str.capitalize() : ", str.capitalize())
次のように上記の出力結果の例は次のとおりです。
str.capitalize() : This is string example from w3big....wow!!!