Python3 istitle()方法
Python 3 教程
· 2019-02-05 22:57:17
描述
istitle() 方法检测字符串中所有的单词拼写首字母是否为大写,且其他字母为小写。
语法
istitle()方法语法:
str.istitle()
参数
- 无。
返回值
如果字符串中所有的单词拼写首字母是否为大写,且其他字母为小写则返回 True,否则返回 False.
实例
以下实例展示了istitle()方法的实例:
#!/usr/bin/python3 str = "This Is String Example...Wow!!!" print (str.istitle()) str = "This is string example....wow!!!" print (str.istitle())
以上实例输出结果如下:
True False
点击查看所有 Python 3 教程 文章: https://codercto.com/courses/l/10.html
用UML构建Web应用
科纳尔伦 (Conallen Jim) / 陈起 / 中国电力出版社 / 2003-11 / 39.0
用UML构建Web应用(第2版),ISBN:9787508315577,作者:(美)Jim Conallen著;陈起,英宇译;陈起译一起来看看 《用UML构建Web应用》 这本书的介绍吧!