How to Start Python in Windows
Python is an easy to learn, flexible, interpreted, high-level programming language.
In this article, we will see how to start Python in Windows.
If you have not installed Python in your system, check out the installation article on the site. If you Python installed, then lets check out the next steps.
We can use Python in interactive mode or in script mode.
To enter interactive mode, open the command prompt. Type python
and press enter
.
This is how interactive mode looks like. In this, you can quickly run blocks or a single line of Python code.
In script mode, you write your code in a text file then save it with a .py
extension which stands for “Python”. If you need to write a long piece of Python code or your Python script spans multiple files, then script mode is more suitable.
To enter script mode, you can use Python IDLE, or any other text editors which support python.
In the File menu, select New File (Ctrl + N). Now a new file is opened. You can write your python script on this file and save it with .py extension.
You can run your program by going to the Run menu and select the Run Module. Now the output will be shown in the shell window.