Run
str = 'Python Examples $125 @6 O\'Clock' if str.isalnum(): print('Given string contains only alphanumeric.') else: print('Given string does not contain only alphanumeric.')
Output