educative.io

How do you create a bigger piece of code without running it immediately in python

How do you create a bigger piece of code without running it immediately?

As elaborated in Approaches of Dynamic Programming - Dynamic Programming in Python: Optimizing Programs for Efficiency, you can use a bottom-up approach. This essentially means that you create the base-level components (methods, class objects etc.) and then connect them together to create the bigger code and run it. It doesn’t make the running prone to error, but with greater confidence in the base components, you can spot the error more conveniently.

I mean if I type one sentence of code and I press enter to go to a different line it runs the code immediately. I want to make multiple sentences before I want the code to run. Which button do I need to press for that?