Introduction to Python annotations and script parameters

高洛峰
Release: 2017-03-10 18:39:05
Original
1630 people have browsed it

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!

Related labels:
source:php.cn
Statement of this Website
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 [email protected]
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!