空行通常被认为是输出?

Ovi*_*Ovi -1 python python-3.x

如果你有一个这样的程序,例如:

 print("Hi there \n")
 print("Hello")
Run Code Online (Sandbox Code Playgroud)

这个程序会被认为有2行或3行输出吗?我知道空白行并不是什么东西,但它仍然是程序所做的事情.

Buz*_*uzz 6

如果您运行该程序,您的输出将如下所示:

hi there 

hello
Run Code Online (Sandbox Code Playgroud)

如果您然后将该输出放入文件并运行wc -l file.txt它将返回文件3 file.txt中有三行的含义.