Python3 isalnum () method
description
Are isalnum () method to detect strings of letters and numbers.
grammar
isalnum () method syntax:
str.isa1num()
parameter
- no.
return value
If there is at least one character string and all the characters are letters or numbers returns True, otherwise False
Examples
The following example shows an example of isalnum () method:
#!/usr/bin/python3 str = "w3big2016" # 字符串没有空格 print (str.isalnum()) str = "www.w3big.com" print (str.isalnum())
Examples of the above output results are as follows:
True False