Home > Article > Backend Development > Introduction to Python annotations and script parameters
This article introduces Python comments and script parameters
Single-line comments:
#Multi-line comments: """ starts, """ ends
Capture Parameter: import sys
sys.argv indicates that the argv function is in the sys module
Eg:hello.py
#_*_ coding: utf-8 _*_
import sys
print sys.argv
print 'Hello, world!'
Execution result:
E:\> ;pythonhello.py localhost:8001
['hello.py','localhost:8001']
Hello, world!
The above is the detailed content of Introduction to Python annotations and script parameters. For more information, please follow other related articles on the PHP Chinese website!