Home >Backend Development >Python Tutorial >How to run script in python?
How to run python script:
##Method 1: Script programming
Write a script file and name it as a .py file (for example hello.py):print ("Hello, Python!");Open the command line window, then switch to the path of the py file, and then enter "python py file name" , Example
python ./hello.pyOutput:
hello,python
Method 2: Use Python’s own IDEL
Python comes with an IDE called IDLE. Enter the script code in IDLE and press Enter.The above is the detailed content of How to run script in python?. For more information, please follow other related articles on the PHP Chinese website!