You are here : python_2stringstringisalnum

string.isalnum() - string

             

The method isalnum() checks whether the string consists of alphanumeric characters.


  • NA


Syntax


str.isalnum()


Example


#!/usr/bin/python

str = "this2009";  # No space in this string
print str.isalnum()

str = "this is string example....wow!!!";
print str.isalnum()


Output / Return Value

When we run above program, it produces following result:


True False


Limitations


Alternatives / See Also


Reference