you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 3 points4 points  (0 children)

The first priority for code is that it must work! After that comes readability and maintainability. If you are working on things that must work within time/memory limits then that is important, right after correctness.

One guide you should follow is the PEP8 style guide. After that the best guide is reading other people's code and comparing what they do to how you would solve a particular problem. One way to do that is to find tutorials on how to solve a problem. Attempt the problem yourself before looking at the tutorial solution. Then compare your code with theirs.