My question is, why can't I call the function again? Or how to do it?
Suppose I have this function:
def a(x, y, z): if x: return y else: return z
and I call it with:
print a(3>2, 4, 5)
I get 4.
But imagine that I am declaring a variable with the same name as a function (by mistake):
a=2
Now, if I try to do:
a=a(3>4, 4, 5)
or
a(3>4, 4, 5)
I will get this error: "TypeError: object" int "cannot be called"
Can't assign the variable 'a' to a function?
function variables python
dvsaraiva
source share