If I open the Pycharm IDE, go to "tools" and select "Python Console", and copy and paste
a=1
b=1
c=1
into the console, how do I execute this? If my cursor is at the end of the script (ie, placed after c=1), I can just hit enter and it works. But the script will not execute if the cursor is placed on one of the first two lines. Hitting Enter only adds a new line between a=1 and b=1. Shift+Enter doesn't work either. Does anyone know how to execute the code without worrying if the cursor is at the very end of the script?
To run source code from the editor in console:
Alt + Shift + E在控制台中执行当前行
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.