[Solved] ‘str’ object is not callable – CAUTION: DO NO USE SPECIAL FUNCTIONS AS VARIABLES


The problem is str function must have been overloaded.

Input:

X=5
print("X value is:"+str(X))

Output:
X value is:5

Input:

X=5
str = "98897"
print("X value is:"+str(X))

Output:
TypeError Traceback (most recent call last)
in ()
—-> 1 print(“X value is:”+str(X))

TypeError: ‘str’ object is not callable

1

solved ‘str’ object is not callable – CAUTION: DO NO USE SPECIAL FUNCTIONS AS VARIABLES