Python index of item in list without error? [duplicate] August 19, 2023 by Tarik a = [1] try: index_value = a.index(44) except ValueError: index_value = -1 How about this?