I took help from this website https://www.geeksforgeeks.org/make-notepad-using-tkinter/ and used the code to create a full-fledged text editor which was like the windows Notepad. Now, I want to integrate a terminal into it so that it can run the programs there itself.
-containeroption to a frame sets it up to contain another window (that's Tk, not python tkinter). Reparenting or embedding another window is different on every system. You'll have to specify which OS you are using.