Platform: Git bash MINGW64, Windows 7, 64 CMD When I run a Python code from Learn Python The Hard Way ex11. The code is simple.
print "How old are you?",
age = raw_input()
print "How tall are you?",
height = raw_input()
print "How much do you weigh?",
weight = raw_input()
print "So, you're %r old, %r tall and %r heavy." % (
age, height, weight)
But they have different result in CMD and Git bash. When I run it using Git bash, the raw_input()
will run first.
When you input 3 answers, then it will show the 4 print in the end. When I run it in CMD, it shows normally, one print, one raw_input()
.
Can somebody explain it?
EDIT: Actually, my goal is to explain the reason, not to solve this with flush. So It is different with this question