:
invest(initial_amount,top_company(5,year,year+1)) = subsequent_amount
which is illegal in Python. The question is, what do you want to do? What does it do invest()? I suppose it returns a value, namely what you are trying to use like subsequent_amount, right?
If so, something like this should work:
amount = invest(amount,top_company(5,year,year+1),year)
source
share