r/PythonLearning • • Sep 20 '25

What's wrong

Post image

Tab wrong? How to solve

144 Upvotes

76 comments sorted by

View all comments

5

u/Glitterbombastic Sep 20 '25

L is defined inside your function (because of the indentation) so it only exists within your function but you’re trying to print it from the outside.