Run A Section Of Code In PyCharm?

pycharm

Solution

You can select the code you want to run, right-click, and select 'Execute Selection in Console'. The keyboard shortcut for this is ALT+SHIFT+E on Windows

Problem

I am moving from R to Python and have been loving PyCharm for it's similarities to my beloved RStudio. However, someone I can't seem to figure out how to do is run a selection of code in a script. Is there any way to do this?

Original source