#NEWLINE# def startswithoneof( inputstr , seq ) : #NEWLINE# #INDENT# '\n    Check if *inputstr* starts with one of the items in seq. If it does, return\n        the item that it starts with. If it doe not, return ``None``.\n\n    :param inputstr: input string\n\n    :param seq: sequences of items to check\n\n    :return: the item the the input string starts with (``None`` if not found)\n\n    :rtype: str or None\n    ' #NEWLINE# seq = set ( item ) #NEWLINE# for item in seq : #NEWLINE# #INDENT# if inputstr . startswith ( item ) : #NEWLINE# #INDENT# return item #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# return None