print函数大家都算是用的比较多的,很多人经常调试的时候,就会用print函数,今天我细致的讲下print函数。
我去查看了print的解释,如下:
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.
"""
pass
从上述可以看出来
print(value, ..., sep=' ', end='\n', file=sys.stdout,flush=False)
value参数可以接受任意多个变量或值,所以print()函数完