passing \n (new line) on stdout throught sys argument

后端 未结 1 1431
抹茶落季
抹茶落季 2020-12-19 15:58

This is elementary I guess:

Let\'s consider this snippet:

for i in range(3):
    sys.stdout.write(str(i) + \'\\n\')

out:

         


        
相关标签:
1条回答
  • 2020-12-19 16:28
    sys.stdout.write(str(i) + sys.argv[1].decode("string_escape"))
    0 讨论(0)
提交回复
热议问题