Print in one line dynamically

后端 未结 20 3213
梦谈多话
梦谈多话 2020-11-21 23:32

I would like to make several statements that give standard output without seeing newlines in between statements.

Specifically, suppose I have:

for it         


        
20条回答
  •  囚心锁ツ
    2020-11-21 23:54

    In [9]: print?
    Type:           builtin_function_or_method
    Base Class:     
    String Form:    
    Namespace:      Python builtin
    Docstring:
        print(value, ..., sep=' ', end='\n', file=sys.stdout)
    
    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.
    

提交回复
热议问题