def findTripletsWith0Sum(lst) :
found = False
size = len(lst)
for i in range(0, size - 2):
for j in range(i + 1, size - 1):
for k in range(j + 1, size):
if (lst[i] + lst[j] + lst[k] == 0):
print(lst[i], lst[j], lst[k])
found = True
if (found == False) :
print("Not found", end ="")
lst = [1, 0, 3, 2, -1, -2, -3, 4]
findTripletsWith0Sum(lst)
'''
run:
1 0 -1
1 2 -3
0 3 -3
0 2 -2
3 -1 -2
-1 -3 4
'''