How to save and run Python program?
Step for Saving Python Program:
Youtube Tutorial: How to Save and run Python program (Please Subscribe this Channel for more video tutorial)
- Open Notepad using run command or Right click on desktop and select New text document.
- Save it with extension (.py). You will see the file like this.
- Sometime it happens that you will not see this file type due to hidden file extension of .txt, you have to unhide this option. Step to unhide the file extension:
- Go to File explorer
- Click on the File option on left top side.

- Select Change Folder and Search options.
- Click on View tab. Uncheck the Hide extensions for known file type.
- Click on Apply to Save.
- Now again open new text document and see there you will the .txt extension.
- You can see difference between this.
To run Python program using file
- Type Run on search bar and type cmd to open Command Prompt or Type cmd on Search bar.
- I have saved my file in desktop to I will go to cmd and with cd command I will enter to desktop. Type this cd Desktop and press Enter
- Edit file with notepad(File which is previous made with .py extension and Write a program in file and save it.
4. Now write "python filename.py"(whatever your file name) and Press Enter
Comments
Post a Comment