python字符串判断
2016-05-14 18:10
204 查看
s为字符串
s.isalnum() 所有字符都是数字或者字母
s.isalpha() 所有字符都是字母
s.isdigit() 所有字符都是数字
s.islower() 所有字符都是小写
s.isupper() 所有字符都是大写
s.istitle() 所有单词都是首字母大写,像标题
s.isspace() 所有字符都是空白字符
from:http://wangwei007.blog.51cto.com/68019/1108673
s.isalnum() 所有字符都是数字或者字母
s.isalpha() 所有字符都是字母
s.isdigit() 所有字符都是数字
s.islower() 所有字符都是小写
s.isupper() 所有字符都是大写
s.istitle() 所有单词都是首字母大写,像标题
s.isspace() 所有字符都是空白字符
from:http://wangwei007.blog.51cto.com/68019/1108673
相关文章推荐
- python部署
- python3.x文件IO学习笔记
- python相关知识/技巧文摘
- Python爬虫技巧总结
- Python中的多进程与多线程/分布式该如何使用
- python实现SMTP邮件发送功能
- 详解Python函数作用域的LEGB顺序
- python爬取51job中hr的邮箱
- Failed to install Python Cryptography package
- [Python]第四讲:print语句
- [Python]第三讲:数据类型
- python处理excel(二):写
- python基础之模块之sys模块
- 168. Excel Sheet Column Title [easy] (Python)
- python爬取51job中hr的邮箱
- 171. Excel Sheet Column Number [easy] (Python)
- Python函数作用域的查找顺序
- 242. Valid Anagram [easy] (Python)
- python02-数据类型与字符串编码
- python程序生成平均脸