Print in one line dynamically

后端 未结 20 3085
梦谈多话
梦谈多话 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:58

    A comma at the end of the print statement omits the new line.

    for i in xrange(1,100):
      print i,
    

    but this does not overwrite.

提交回复
热议问题