July 20, 2021
from itertools import combinations
def solution(numbers):
answer = []
com = combinations(numbers, 2)
for x, y in list(com):
answer.append(x+y)
return sorted(list(set(answer)))
def solution(numbers):
answer = []
for i in range(len(numbers)):
for j in range(i+1, len(numbers)):
answer.append(numbers[i] + numbers[j])
return sorted(list(set(answer)))