Run
x = "" if x.isidentifier(): print('Given string is a valid IDENTIFIER.') else: print('Given string is NOT a valid IDENTIFIER.')
Output