近期的项目中 涉及到相关知识 就来总结一下 !
先看源码:
def print(self, *args, sep=' ', end='\n', file=None): # known special case of print """ 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. """ # 附带翻译哦! 将值打印到溪流或系统中。默认stdout。 可选关键字参数: 文件:类似文件的对象(流);默认为当前的systdout。 sep:在值之间插入字符串,默认空格。 结束:在最后一个值之后附加的字符串,默认换行。