Run
x = "Abc@123" if x.isalnum(): print('Given string is ALPHA-NUMERIC.') else: print('Given string is NOT ALPHA-NUMERIC.')
Output