Here's how we refactor our code:
GUI_adding_widgets_in_loop.py
Running this code will create the same window as before, but our code is much cleaner and easier to maintain. This will help us when we expand our GUI in the coming recipes.