In order to write Python code you will need to install a code editor.
You can download vscode directly from Microsoft website.
Once vscode is installed you can start to write Python scripts!
P.S. don't forget the .py extension in your filename.