Good day guys, thanks for helping out in my other post yesterday.
I have another issue and here it is; how do I create a .py file from the command prompt?
Below is what I was trying to do;
- Open a Terminal (if on Mac) or Command Prompt (if on Windows) and browse to a directory of your choice.
- Create a new file called
mycode.pyand open it with your favorite text editor.
- Copy and paste the following code and save the file.
print(“I’m running Python code on my own environment!”)
- Finally, run the script by executing the following command from the Terminal/Command Prompt in the folder where the file was saved.
- Our console should print the following message
I’m running Python code on my own environment!.
- That’s it! We just ran Python code on our own personal environment.
Now how do I create the mycode.py from the windows command prompt?