鱼C论坛

 找回密码
 立即注册
查看: 5794|回复: 9

[已解决]python3里面for循环print自动换行的规律

[复制链接]
发表于 2018-1-18 03:36:49 | 显示全部楼层    本楼为最佳答案   
问问题之前可以先看看help(print)
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. #字符串末尾添加一个值 默认是新行'\n'
    flush: whether to forcibly flush the stream.
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2025-10-23 03:35

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表