Yo! exec() works, but yeah, it’s not always the best. I usually just import the script as a module. Like, if your script is `myscript.py`, just do `import myscript` in the shell.
For debugging, print statements are my go-to. Simple but effective. If you want something fancier, try PyCharm’s debugger—it’s a lifesaver.
Also, if you’re running stuff in the shell a lot, maybe look into IPython. It’s way more user-friendly than the default shell.
For debugging, print statements are my go-to. Simple but effective. If you want something fancier, try PyCharm’s debugger—it’s a lifesaver.
Also, if you’re running stuff in the shell a lot, maybe look into IPython. It’s way more user-friendly than the default shell.
