2018-07-06-Python|2018-07-06-Python title()方法

Python title() 方法返回"标题化"的字符串,就是说所有单词都是以大写开始,其余字母均为小写(见 istitle())。
title()方法语法:

str.title();
以下实例展示了 title()函数的使用方法:
str = "this is string example....WWW!!!"
print(str.title())
以上代码的打印结果是:
【2018-07-06-Python|2018-07-06-Python title()方法】This Is String Example....Www!!!

    推荐阅读