How to run a python script?
You have to install python before starting to work in it. There are multiple ways and different versions of python available today.
When you are done with the installing process of python you can run your program in the following two ways:-
- in interactive mode(also called Immediate mode)
- in script mode
Here we’ll see how to run python script?
First we have to write a program in a text editor and save it with .py extension. Then we have to open command prompt(cmd) and write the following syntax:-python file_name.py
Then our python script will be executed.
#demo example print(Hello, World!)
The name of my demo file is “hello.py”.
This is how we can run python script.
Please login to comment
View all comments