|
发表于 2019-4-8 11:17:08
|
显示全部楼层
本帖最后由 13572044595 于 2019-4-8 11:27 编辑
print() 函数,默认是 end='\n',以 换行为结束符,你也可以 更改 end 的值,
shell 里面查看 函数的 帮助信息
>>> help(print) # help() -- 帮助函数
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.
>>>
|
|