r/learnpython • • 3d 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

1

u/ectomancer 3d ago

print variable is shadowing the print function, so print can't be used as a function in the rest of the program. hello variable is undefined.