Loops and checking for string starts

In Python 2.5 and above, you can use a tuple as an argument to startswith:

>>> a = 'hello'
>>> a.startswith((' hel', 'he', 'no'))
True
>>>

Hope this helps.

Carl T.