In PyCharm, you can use an interactive Python session to quickly tests a code fragment, to consult the online help or to execute the code from the editor. The instruction video below explains how to start and use an interactive session in PyCharm (with Python version 3.6).
Proceed as follows to start an interactive session:
Make sure the Console window is visible in PyCharm; this can be done by clicking this button at the left of the PyCharm window.

In the Console window you can enter Python statements that are executed immediately.
In case you want to execute part of the source code that is displayed in the Editor window in the interactive Python console, you can right-click the Editor window and select Execute selection in console (or Alt+Shift+E) from the popup menu.

You can use an interactive Python console to issue online help; in the session below we call the built-in function help to get information about the built-in function print.
