Home  >  Article  >  Backend Development  >  Introduction to Python annotations and script parameters

Introduction to Python annotations and script parameters

高洛峰
高洛峰Original
2017-03-10 18:39:051866browse

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn