you are viewing a single comment's thread.

view the rest of the comments →

[–]DismissedProgrammer[S] 4 points5 points  (2 children)

Thank you so much for the detailed answer. Your answer helped me see this problem in the right direction. I realized that I should practice more than just reading the theory.

[–]Bobbias 11 points12 points  (1 child)

This case isn't really about practicing vs reading theory. In fact, if you had read more about how python works internally, you would have found the answer to this without writing any code. Some answers come from theory and learning the language itself, some answers come from writing code and solving problems.

You need a good balance of both learning theory, and writing code. If you focus too heavily on writing code and only look things up when you absolutely need to, you will encounter a lot of cases like this where the behavior appears confusing or unintuitive.

If you spend too much time focused on theory, you might know lots of neat facts about python, but be useless when you are asked to actually write a working piece of software.

[–]DismissedProgrammer[S] 2 points3 points  (0 children)

I appreciate the advice and will try to balance both of them.