r = []
list_of_numbers = [61.12, 13.11, 100.12, 12.32, 200, 60.0, 145.34, 14.22, 
    100.21, 14.77, 214.35, 200.32, 65.43, 0.49, 132.13, 143.21, 156.34, 
    11.32, 12.34, 15.67, 17.89, 21.23, 14.21, 12, 122, 134]
list_of_numbers = sorted(list_of_numbers)
list_of_numbers.reverse()
sum_to_be_formed = 401.54

def a(n, b):
    global r
if len(b) == 0:
    return False
while b[0] > n:
    b.remove(b[0])
if len(b) == 0:
    return False
if b[0] == n:
    r.append(b[0])
return True
if len(b) == 1:
    return False
for i in b:
    if a(round(n - i, 2), b[b.index(i) + 1:]):
        r.append(i)
return True
return False
if a(sum_to_be_formed, list_of_numbers):
    pass
Алгоритм поиска числа в списке, сумма которого равна определенному числу