Conditional Execution and the if Statement : endswith « String « Python Tutorial






name = raw_input('What is your name? ') 
if name.endswith('Gumby'): 
  print 'Hello, Mr. Gumby'
5.7.endswith
5.7.1.Conditional Execution and the if Statement
5.7.2.Searching Strings for Specific Endings/Beginnings