python数据类型之字符串

判断字符串 是否是‘标题’ 标题就是首字母大写 In [1]: 'Hello'.istitle() Out[1]: True In [2]: 'hello'.istitle() Out[2]: False 判断字符串 是否是’大写‘ ,‘小写‘ 只有全部字符都是大写才是大写 全部都是小写才算是小写 In [7]: 'heLLo'.islower() Out[7]: False In [8]: 'h
相关文章
相关标签/搜索