语法
以下是title()方法的语法:
str.title();
参数
NA返回值
此方法返回其中所有单词的前几个字符都是大写的字符串的一个副本。
例子
下面的例子显示了title()方法的使用。
#!/usr/bin/python str = "this is string example....wow!!!"; print str.title();
当我们运行上面的程序,它会产生以下结果:
This Is String Example....Wow!!!
查看更多关于Python中title()方法的使用简介的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did91423