Is there a Python shortcut to get around the need for `print ()`

In R 3 * 2, entered in the editor, you can run in the console as [1] 6by pointing the cursor to the line where the code is entered; pressing Runusing RStudio or Ctrl + Enter. Very comfortably.

New to Python, I understand that if I want to see 6, I may need to type print(3 * 2)if I cannot find the expression directly in the Python console. Or is there a shortcut?

By the way, I use Pycharm as an IDE.

+4
source share
2 answers

In the Pycharm spell editor, go to

Settings> Keyboard> Other

" ". " "

, Alt + Shift + E. R Pycharm Ctrl + R . , Ctrl + R - Pycharm, Alt + R.

, , . , .

+2

IPython. , Jupyter ( "IPython Notebook" ).

0

Source: https://habr.com/ru/post/1624467/


All Articles