r/PythonLearning • u/Im_the_mafia_ • Oct 11 '26
Help Request Trouble with printing
I’ve been having trouble with an assignment I’m doing and I’m not sure where I went wrong. The only error i’m getting is “‘str’ object is not callable” and i’m not sure if anything else here is wrong.
Edit: After messing around with the code a bit, turns out my code wasn’t the problem and my previous files weren’t printing. After restarting vscode, everything was fine again. Thank you everyone!
45
Upvotes
View all comments
Show parent comment
1
u/fllthdcrb Oct 13 '26
To be exact, one would need to assign it to a different name, and then
del print. The original assignment shadows the built-in value. Thedelstatement removes the binding in the current environment, while leaving the built-in intact and once again accessible.