how to check whether a string is alphanumeric or not in python code example Example: how to check if a string is composed only of alphanumeric in python String.isalnum()