Python isalnum () method
description
Are Python 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/python str = "this2009"; # No space in this string print str.isalnum(); str = "this is string example....wow!!!"; print str.isalnum();
Examples of the above output results are as follows:
True False