20 Nov 2022
def two_sum2(lst, target): for i in range(len(lst)): if target - lst[i] in lst[i+1:]: return (lst.index(lst[i]), lst.index(target-lst[i])) return -1