def FindInList(list, elem): try: i = list.index(elem) return i except ValueError: return None