Python-string-capitalize

提供:Dev Guides
移動先:案内検索

Python String capitalize()メソッド

Python String * capitalize()*メソッドは、最初の文字のみを大文字にした文字列のコピーを返します。

構文

str.capitalize()

パラメーター

  • NA

戻り値

ひも

#!/usr/bin/python

str = "this is string example....wow!!!";
print "str.capitalize() : ", str.capitalize()

結果

str.capitalize() :  This is string example....wow!!!