Str.isalnum will return True if elements in String are alphanumeric i.e from A to Z and 0 to 9 else it will return false .
How to use Str.isalnum in Python:
As shown below a is string containing alphanumeric characters and special characters.when we apply isalnum() on first element of string it returns True because it is alphanumeric character ‘p’.But when we apply on a[4] element which is special character it rerturns ‘False’ because it is not alphanumeric.Â
Â
[…] Str.isalnum: It returns True if characters in given string are […]