RStudio is just way better at choosing what code to send (if you only send the line the cursor rests on you’re gonna have a bad time. VSCode is a bit better than that but not great. Also, where does your plots get drawn when you use this? RStudio just works in this regards)
Just open a .py file, then select the snippet of code you want to run and cmd+enter
It will open a new REPL for you (using your selected interpreter) the first time, and after that all commands are run in that same one.