开发者社区 问答 正文

python中怎么打印

python中怎么打印

展开
收起
云计算小粉 2018-05-10 20:10:45 1598 分享 版权
1 条回答
写回答
取消 提交回答
  • print 函数

    要了解 print 函数的用途,可以使用 help() 来寻求帮助:

    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.

    将对象输出到文本流文件,由 sep 分开,然后以 end 结束。如果 sep、end、file 和 flush 出现,则必须以关键字参数的形式指定。

    2019-07-17 22:22:17
    赞同 展开评论
问答分类:
问答标签:
问答地址: