python中print函数参数解析

print(*values: object,
    sep: Optional[Text]=..., 
    end: Optional[Text]=..., 
    file: Optional[_Writer]=..., 
    flush: bool=...) -> None

参数详解:

param *values: object
print(value, ..., sep=' ', end='\n', file=sys.stdout, flush=False)
Prints the values to a stream, or to sys.stdout by default.
Optional keyword arguments:
file: a file-like object (stream); defaults to the current sys.stdout.
sep: string inserted between values, default a space.
end: string appended after the last value, default a newline.
flush: whether to forcibly flush the stream.

print的效用:Prints the values to a stream, or to sys.stdout by default.—将值以流的形式输出,或者使用默认打印在控制台
print函数参数列表:

posted @ 2020-04-22 12:50  牛犁heart  阅读(1267)  评论(0编辑  收藏  举报