Python: Cannot Assign Function Call -
i having problem such as:
def function (number): number in list: number = number + 1
for example function(1): number in range(1,5): number = number + 1
error come "can't assign function call" use variable value further calculations.
help!
i think have 2 problems. first, not naming function or declaring properly; should this:
def f(number): ...
second, naming function parameter number
on next line seem treating list
though parameter. think mean instead:
def f(list): number in my_list: ...
Comments
Post a Comment