Run
x = "Hello world" if x.istitle(): print('Given string is a TITLE.') else: print('Given string is NOT a TITLE')
Output