Python 中 print 与标准输出

第一次了解这种写法。Python 3 中 print 函数的文档中其实也提到了:

Docstring:
print(value, ..., sep=' ', end='\n', file=sys.stdout)

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.
Type:      builtin_function_or_method
2 comments