Copyright © tutorialspoint.com
This method checks whether the string consists of alphanumeric characters.
str.isa1num() |
Here is the detail of parameters:
NA
It return true if all characters in the string are alphanumeric and there is at least one character, false otherwise.
#!/usr/bin/python str = "this2009"; # No space in this string print str.isalnum(); str = "this is string example....wow!!!"; print str.isalnum(); |
This will produce following result:
True False |
Copyright © tutorialspoint.com