Python3 isalnum()方法
Python 3 教程
· 2019-02-05 21:27:01
描述
isalnum() 方法检测字符串是否由字母和数字组成。
语法
isalnum()方法语法:
str.isalnum()
参数
- 无。
返回值
如果 string 至少有一个字符并且所有字符都是字母或数字则返回 True,否则返回 False
实例
以下实例展示了isalnum()方法的实例:
实例(Python 2.0+)
#!/usr/bin/python3
str = "codercto2016" # 字符串没有空格
print (str.isalnum())
str = "www.codercto.com"
print (str.isalnum())
以上实例输出结果如下:
True False
点击查看所有 Python 3 教程 文章: https://codercto.com/courses/l/10.html
Google API开发详解
江宽,龚小鹏等编 / 电子工业 / 2008-1 / 59.80元
《Google API开发详解:Google Maps与Google Earth双剑合璧》从易到难、由浅入深、循序渐进地介绍了Google Maps API和Google Earth API的开发技术。《Google API开发详解:Google Maps与Google Earth双剑合璧》知识讲解通俗易懂,并有大量的实例供读者更加深刻地巩固所学习的知识,帮助读者更好地进行开发实践。 《Go......一起来看看 《Google API开发详解》 这本书的介绍吧!