1. 单独执行选中的代码块或者单行代码 Alt+Shift+E ,或者选中代码,右键选择:”Execute Selection in Python Console”

    image.png