|
|
发表于 2018-3-29 02:28:15
|
显示全部楼层
help(print)
Help on built-in function print in module builtins:
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.
在IDLE中,用help(print)查看print()函数的函数文档。默认情况下(end=‘\n’),打印完字符串后自动换行;若想打印完字符串后不自动换行,可将参数end设置为:end=' ',表示打印完字符串后,以空格结束(不会自动换行)。 |
|