VS Code has this
https://code.visualstudio.com/docs/pytho...ello-world Wrote:Select one or more lines, then press Shift+Enter or right-click and select Run Selection/Line in Python Terminal. This command is convenient for testing just a part of a file.