How to organize Python code into collapsable / expandable chunks?
14:35 11 Jul 2019

In PyCharm, there's a "code structure" side bar which provides a tree to navigate through the code, but it is only useful when the code has classes and methods and objects. If nothing of that is in code then it is useless.

Is there any way in which I dictate that this is a block, and I want to be able to collapse it and expand it? Something similar to Jupyter where the code is inherently divided to cells.

Currently, I'm doing this:

# ---------------------------------- chunk x blah blah -----------------------
python pycharm