Why do we save the output of compile program to TEAL assembly to file?

Hi Algo Community,

I am studying the documentation of the python sdk and i see these steps:

compile program to TEAL assembly

with open("./approval.teal", “w”) as f:
approval_program_teal = approval_program()
f.write(approval_program_teal)

compile program to TEAL assembly

with open("./clear.teal", “w”) as f:
clear_state_program_teal = clear_state_program()
f.write(clear_state_program_teal)

I see such output is used to compile the program and then to deploy the app, but then:

  • What is the reason for storing these outputs to file? is it required at any later point in time?

I learned this is just to inspect the teal code that is created, the python sdk generates TEAL code and then executes it. As such it is not to be treated like any python module because it has the constraints of TEAL as language.