Python 字符串Capitalize()方法返回字符串的副本,其中只有第一个字符大写。
str.capitalize()
字符串
#!/usr/bin/python str="this is string example....wow!!!"; print "str.capitalize() : ", str.capitalize()
运行上面代码输出
链接:https://www.learnfk.comhttps://www.learnfk.com/python/string-capitalize.html
来源:LearnFk无涯教程网
str.capitalize() : This is string example....wow!!!
祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)