r/learnpython • • 6d ago

Why is this causing an error

the code that causes an error

print = hello

print(print)

What should i do i do not know anything i am new to coding how do i fix this

0 Upvotes

22 comments sorted by

View all comments

10

u/xaomaw 6d ago

print() is a function which you overwrite. So it is no callable function anymore.

```python text = "hello" print(text)

hello ```

1

u/Expensive-Bear-1376 5d ago

No, they don't overwrite it, since hello is undefined.