check if string is alphanumeric python code example
Example 1: how to check if a string is composed only of alphanumeric in python
String.isalnum()
Example 2: isalphanum python
s="abc 123"
s.isalnum()
#returns
False #as we have space in it
s1="abc123"
s1.isalnum()
#returns
True