This is a dumb question but I'm new to Python and couldn't figure out why my codes only works with Jupyter notebook and not in other IDEs or Text Editors. For example, I realized I always have to use the "Print" function to get my output in PyCharm and Sublime Text3 while I can just run values without the print function in Jupyter Notebook.
Here's a simple example: In Jupyter Notebook, I can simply run the codes without the print function
x = 10
y = 20
x+y
if i run this, i still get my output, which is 30.
But if I do the same thing in PyCharm or Sublime Text3, I don't get the output. It just says [Finished in X.Xs] without printing my output and I always have to use the print function to get the output.
x=10
y=20
print(x+y)
I wonder what causes the difference. At first, I thought it was because of the type of software I was using and realized both Pycharm and Jupyter Notebook are IDEs. Do I need to change settings in order to make my codes work in Pycharm or Sublime Text3?
Thank you.