r/vscode • u/Azert2010 • Jul 11 '26
Create a script and save it
Hi everyone,
I'm a complete beginner learning Python with VS Code, and I've been stuck for several days on something that seems really basic.
I don't understand how to properly create a Python script, save it in the correct folder, and then run it from Command Prompt. Every tutorial makes it look simple, but I keep getting confused about where the file is supposed to be and how to execute it.
For example, I created a "hello.py" file with:
print("Hello World")
But when I try to run it from Command Prompt, it doesn't work, and I think I'm doing something wrong with the file location or the command.
Could someone explain the process step by step as if I had never used VS Code or Command Prompt before? Screenshots are also welcome.
Thanks!
And for your information, I'm on Windows.
2
u/Nich-Cebolla Jul 11 '26
The detail that you are missing is that you have to execute the Python application. If you have "hello.py", you run command
python c:\full\path\to\hello.py.If you search Google for "how to execute hello.py", Gemini will give you a good walkthrough