Att String Isalnum
# Python2.x Python isalnum() Method
[ Python Strings](#)
* * *
## Description
The Python isalnum() method checks whether all characters in the string are alphanumeric (either alphabets or numbers).
## Syntax
The syntax for the isalnum() method is:
str.isalnum()
## Parameters
* None.
## Return Value
Returns True if all characters in the string are alphanumeric and there is at least one character, otherwise returns False.
## Example
The following examples demonstrate the usage of the isalnum() method:
## Example (Python 2.0+)
#!/usr/bin/python# -*- coding: UTF-8 -*-str = "this2009"; # No space in the string print str.isalnum(); str = "this is string example....wow!!!"; print str.isalnum();
The output of the above example is:
TrueFalse
* * Python Strings](#)
YouTip