程序小白报到!在《python简明教程》里看到一个小段,有import sys后面写到“for i in sys.argv”,这个sys.argv是从哪里来的?还有,解释里说sys.argv[0]是“we”,sys.argv[1]是“are”。这都是从哪来的,是自己写的么?放在哪呢?各位老师见笑了...
回复内容:
sys是Python的一个「标准库」,也就是官方出的「模块」,是「System」的简写,封装了一些系统的信息和接口,官方的文档请戳:27.1. sys — System-specific parameters and functions,中文版的可以参考:[python] sys模块
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