"Fred L. Drake, Jr." <fdrake at acm.org> writes: > s = some string... > if s.startswith("Simpsons"): > do something interesting... Very cool! It's long bothered me that you can't check whether a string starts with a phrase without either consing (s[:3] == 'foo') or resorting to regexps (re.match('^foo', s)).