I was told its bad coding to practice to do it this way because it's slower than pulling the code from a separate python file + I show some other quirky stuff that can happen, but if its just for something light you might need to know how to do it this way.