SyntaxError: “can't assign to function call”

后端 未结 4 986
误落风尘
误落风尘 2020-11-30 11:33

This line in my program:

invest(initial_amount,top_company(5,year,year+1)) = subsequent_amount

causes me to get this error:



        
4条回答
  •  南方客
    南方客 (楼主)
    2020-11-30 11:51

    You wrote the assignment backward: to assign a value (or an expression) to a variable you must have that variable at the left side of the assignment operator ( = in python )

    subsequent_amount = invest(initial_amount,top_company(5,year,year+1))
    

提交回复
热议问题