printing - Python stdin request coming before stdout prints -


i've been trying learn python 3.3 , run problem. here test code using:

print('should print before stdin') x = raw_input('enter something: ') 

and here output looks like:

>>something should print before stdin enter something: 

why print statements coming after stdin?

in python 3.x, raw_input("") has been eliminated , use input() instead. refer docs.

print('should print before stdin') x = input('enter something: ') 

output

should print before stdin enter something: yes  process finished exit code 0 

Comments

Popular posts from this blog

c# - Unity IoC Lifetime per HttpRequest for UserStore -

Change the color of an oval at click in Java AWT -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -