Should I run my Python code in VS Code or Jupyter Notebook?

Question:

I want to run my Python code. I’m actually running it in VS Code right now because I have VS Code installed and I know how to use it. However, should I use Jupyter Notebook to run it?

I hope someone can compare them and give me some opinion.

Feel free to leave a comment if you need more information.

Should I run my Python code in VS Code or Jupyter Notebook? I would appreciate any help. Thank you in advance!

Asked By: My Car

||

Answers:

VS Code is a text editor which can be extended to work like an IDE by installing extensions. A typical project can have different sorts of files like Python files, shell scripts, Dockerfile, JSON etc. VS Code provides Intellisense (code recommendations) support, code colour themes, an integrated terminal, user-friendly project navigation, debug env, Github integration etc. to efficiently develop, test and even deploy your project. So, if you are working on a full-blown project then VS Code is recommended over Jupyter notebook.

On the other hand, Jupyter Notebook are widely used in quick prototyping simple projects and scripts. Its widely used in data science and machine learning projects as it also provides great visualization for analytics problems. Intellisense is passive, which means you don’t get recommendations as you type the code, unless you use a shortcut like Ctrl + Space . Jupyter Notebook are great when you want to quickly write some code and see its output or have code written in multiple cells that may/may not share variables, functions etc.

Lastly, now there are extensions available in VS Code that allow Jupyter notebook integration within VS Code. So, whenever you want to use Jupyter, you can do it from right within VS Code.

Answered By: amanb