Getting “str” object is not callable

how do i fix it? Traceback (most recent call last): File "/home/runner/test/main.py", line 14, in <module> lol() File "/home/runner/test/main.py", line 9, in lol lol() TypeError: 'str' object is not callable

basically “lol” is a string not a function

1 Like

how i defined the function lol though whatever i will try to change the name

1 Like

Did you set lol to a string after you made it a function? If you did, lol would no longer be set to a function.

2 Likes

yeah i set lol to a function and inside lol i made another lol string

i solved it myself though

He was trying to call a str instead of a function :).

i accadentaly set lol to a string inside of a lol function and try to call lol inside of the function

1 Like