Reply content:
First, as the answer above @ Kochau says, the shell's behavior is not exactly the same as the Python code
>>> for i in range(5):... i... 01234
This example is very interesting, no invitation, let me answer it.
Using unfamiliar functions and the library is dangerous.
Using unfamiliar functions and the library is dangerous.
Using unfamiliar functions and the library is dangerous.
The important words are three times.
First of all, look at this example, just to change the helloworld.cpp slightly, the main think this code should output what results?
#include
#include
usingnamespacestd;intmain(){ cout<<printf("asdf")<<endl;}
mainly because this thing has changed. Mainly because this thing has changed.
The standard output in the C library did not change.
Specifically, you can read this article / http ELI.THEGREENPLACE.NET/2 015/redirecting-all-kinds-of-stdout-in-python/