如何在 Pycharm 中运行代码 [英] How to run code in Pycharm
问题描述
如果我进入工具"并选择python控制台",然后输入几行代码,我该如何执行?如果我的光标在脚本的末尾,我可以直接按回车键.但是,如果光标不在末尾,如何使用键盘快捷键运行代码?在 Spyder 中,这是使用 shift+enter 完成的,但我不知道如何在此处执行此操作.我见过一些地方说控制+输入,但这不起作用.谢谢!
If I go to "tools" and select "python console", and enter several lines of code, how do I execute this? If my cursor is at the end of the script, I can just hit enter. But how can I run the code using keyboard shortcuts if the cursor is not at the end? In Spyder this is done using shift+enter, but I can't figure out how to do it here. I've seen places say control+enter, but that doesn't work. Thanks!
推荐答案
如果您使用 Win 10, 64Bits.使用 Ctrl + Shift + F10 运行您的代码,或者只需右键单击工作区,然后从选项中单击运行.
If you use Win 10, 64Bits. Run your codes using Ctrl + Shift + F10 or simply right click on the workspace and click Run from the options.
这篇关于如何在 Pycharm 中运行代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!