5. Run the code: You can run your Python code by clicking on the “Run” icon on the left sidebar (or press F5), selecting “Python File” as the environment, and clicking on the “Run” button. Alternatively, you can run your Python code from the terminal by typing “python filename.py” and pressing Enter (where “filename” is the name of your Python file).
That’s it! You now have VS Code configured for Python development. You can continue to customize your settings and install additional extensions as needed.
Step 4: Start Writing Python Code in VS Code
Now that you’ve installed Python and VS Code, and configured VS Code for Python development, you’re ready to start writing Python code. To create a new Python file, click on “File” -> “New File” and save the file with a .py extension.