def findAllPairs(lst, sum) :
found = False
length = len(lst)
for i in range(0, length -1) :
for j in range(i + 1, length) :
if (lst[i] + lst[j] == sum) :
print("lst[" + str(i) + "](" + str(lst[i]) + ") + " + "lst[" + str(j) + "](" + str(lst[j]) + ")")
found = True
if (not found) :
print("Pair not found")
lst = [2, 4, 1, 5, 6, 8, 1]
summ = 10
findAllPairs(lst, summ)
'''
run:
lst[0](2) + lst[5](8)
lst[1](4) + lst[4](6)
'''