You can call functions to help make big problems more manageable. One large function can use many small functions inside of it in order to complete a task. It is good coding style to decompose the solution. Decomp is also useful in making your code readable to other people and yourself in the future

def function1 ():

code block A

def function2 ():

code block B

function1()

code block C

Running function2 goes through this process:

  1. Run code block B
  2. Run code block A
  3. Run code block C