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.Â

how to write str.isalnum
1.String isalnum()

Â

By SC

One thought on “Str.isalnum”

Leave a Reply

Your email address will not be published. Required fields are marked *