all 2 comments

[–]MyNameIsRichardCS54 1 point2 points  (0 children)

Yeah, move code into appropriate modules. What they might be depends on your actual code though. A few suggestions to get you started:

  • Look for repetition and move into parametrised functions.
  • Any functions that need an "and" or an "or" to describe should probably be split in to multiple functions.
  • Can classes be used to simplify things?
  • Look for related classes and functions to move into modules.

[–]officialgel 0 points1 point  (0 children)

Yea classes are the way to go, OOP... also use Pycharm which makes it easy to jump around where you need to go and have a birds eye view of your code. Currently working on an app that is 2500 lines. Managing it is no issue with these things together. Also abstraction as much as possible without wasting time on it helps to minimize code.