TypeError: 'str' object is not callable

topic="Fundamentals of Data Science"
print(topic)

Google colaboratory python notebook is giving following error.

---------------------------------------------------------------------------

TypeError                                 Traceback (most recent call last)

<ipython-input-22-7d4bc95862bf> in <module>()
----> 1 print (school)

TypeError: 'str' object is not callable

How to resolve this problem?

Kindly try to reconnect google colaboratory and run.

1 Like

Thank you…my problem has solved.

TypeError: ‘str’ object is not callable usually means you are using your () notation on a string, and Python tries to use that str object as a function. e.g. “hello world”(), or “hello”(“world”). Or, if you have variable str and trying to call str() function. Finally: Do not declare python variable name same with python built-in function name, keyword etc.

1 Like