單行註釋: #
多行註釋:"""爲開始,"""結束
捕獲參數:import sys
sys.argv 表示argv功能在sys模塊裏邊
Eg:hello.py
#_*_ coding: utf-8 _*_
import sys
print sys.argv
print '你好,世界!'
執行結果:
E:\>pythonhello.py localhost:8001
['hello.py','localhost:8001']
你好,世界!
單行註釋: #
多行註釋:"""爲開始,"""結束
捕獲參數:import sys
sys.argv 表示argv功能在sys模塊裏邊
Eg:hello.py
#_*_ coding: utf-8 _*_
import sys
print sys.argv
print '你好,世界!'
執行結果:
E:\>pythonhello.py localhost:8001
['hello.py','localhost:8001']
你好,世界!