In PyCharm, here are the different ways to run code in the Python Console: From Python Console: Shift + Enter: Execute the current line or selected code Alt + Shift + E: Execute selection in console Control + Enter (on Mac: Command + Enter): Execute the current line and move to the next line From Editor: Alt + Shift + E: Execute selected code in console Right-click and select "Execute Selection in Python Console" If these shortcuts don't work: Check your keymap settings: Go to File → Settings → Keymap (on Mac: PyCharm → Preferences → Keymap) Search for "Execute" Look for "Execute Selection in Console" and verify/modify the shortcuts