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