|
|
发表于 2015-4-20 10:34:46
|
显示全部楼层
- >>> 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.
复制代码
上面是 Python print的帮助
print 有个一个end 的参数 默认情况下 end的参数是 '\n' 就是换行
而上面你把end 的参数修改为 ' '空 所以 不进行换行 |
|