Python OOPs


Python SQLite


Examples


Others


isalnum() method in Python


The isalnum() method returns the value True , if all the characters are alphanumeric in the string. An alphanumeric character is either a letter (A-Z, a-z) or a digit (0-9).

Syntax
string.isalnum()

No Parameters

Example with alphanumeric string.

Example
a = "RamKumar30"
b = a.isalnum()
print(b)

Output

True

Example with spaces.

Example
a = "RamKumar 30"
b = a.isalnum()
print(b)

Output

false

Python String Methods