Python code can be written using a text editor. Bencaogen uses Sublime Text. The first Python program is of course Hello Python. Print this sentence.
Note that there should not be any spaces in front of print, and finally save it. You can see that after Python is saved, it will be a file with a .py suffix.
Finally, you can open the command line window, switch the current directory to the directory where HelloPython.py is located, and then run the program. The following is the result of the operation.
Of course, if you are using Sublime Text and configured the environment variables when installing Python, you can just press Ctrl B to run it. The running results are as follows: