print("abdc1321".isalnum())

print("[email protected]$".isalnum())

# Another way is to use match() method from the re (regex) module as shown:

import re

print(bool(re.match('[A-Za-z0-9]+$','abdc1321')))  
print(bool(re.match('[A-Za-z0-9]+$','[email protected]$')))