from itertools import combinations
numbers = [1571.48, 327.53, 286.60, 349.50, 517.67, 247.00, 882.73, 274.00, 237.50, 301.00, 973.50, 288.75, 347.50, 326.81]
for i in range(len(numbers)):
for combination in combinations(numbers, i):
if sum(combination) in {4600.31, 2331.26}:
print('A soma de ', combination, 'resultou em', sum(combination))
ZnJvbSBpdGVydG9vbHMgaW1wb3J0IGNvbWJpbmF0aW9ucwoKbnVtYmVycyA9IFsxNTcxLjQ4LCAzMjcuNTMsIDI4Ni42MCwgMzQ5LjUwLCA1MTcuNjcsIDI0Ny4wMCwgODgyLjczLCAyNzQuMDAsIDIzNy41MCwgMzAxLjAwLCA5NzMuNTAsIDI4OC43NSwgMzQ3LjUwLCAzMjYuODFdCgpmb3IgaSBpbiByYW5nZShsZW4obnVtYmVycykpOgogICAgZm9yIGNvbWJpbmF0aW9uIGluIGNvbWJpbmF0aW9ucyhudW1iZXJzLCBpKToKICAgICAgICBpZiBzdW0oY29tYmluYXRpb24pIGluIHs0NjAwLjMxLCAyMzMxLjI2fToKICAgICAgICAgICAgcHJpbnQoJ0Egc29tYSBkZSAnLCBjb21iaW5hdGlvbiwgJ3Jlc3VsdG91IGVtJywgc3VtKGNvbWJpbmF0aW9uKSk=