string endswith
name = raw_input('What is your name? ') if name.endswith('Yin'): print 'Hello, Mr. Yin'