There are two ways to run Python programs:
- Use interactive prompt interpreter
- The traditional way of using source files
1. The first way
Open the interpreter
Enter the code and press Enter to run
2. The second way
Create a new python file (I created a new one under D drive)
Write the following code in the file
print 'hello,world'
- 1
Open cmd and
enter python+space, like this "python", and then drag and drop the file to be run behind. After pressing enter, the python file is run.