老版本:框选需要运行代码-任务栏run-run selection or current line
新版本:框选需要运行代码-右键-单击Execute Selection in Python Console

更多推荐

Python只运行一部分代码方法