This error message occurs when you try to assign a value to a function call instead of a variable. Functions are not mutable, which means that you cannot change their value by assigning a new value to them.

For example, if you have a function called my_function and you try to assign a value to it like this:

my_function = 10

you will get the error message "can't assign to function call".

To fix this error, you need to make sure that you are assigning the value to a variable, not to the function itself. For example:

my_variable = my_function()

This assigns the return value of the function to a variable called my_variable

cant assign to function call

原文地址: https://www.cveoy.top/t/topic/fFYl 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录