
text_long = "There were 42 monkeys in the airplane."
text_word = "hello"
text_title = "String Methods"

for t in [text_long, text_word, text_title]:
    print '"%s"' % t
    print "Count 'th':      ",t.count( 'th')
    print "Count 'l':       ",t.count( 'l')
    print "Startswith 'St': ",t.startswith("St")
    print "Endswith '.':    ",t.endswith(".")
    print "Find 'l':        ",t.find('l')
    print "Rfind 'l':       ",t.rfind('l')
    print
