I'm writing a very simple prompt-input sequence:
print "question",
a = raw_input()
print "question",
b = raw_input()
print "question",
c = raw_input()
print "question",
d = raw_input()
print "Your answers were: %r, %r, %r and %r" % (a, b, c, d)
The problem is: when running the code in bash, it asks directly for all four inputs before printing the questions. Any idea why this could be happening?
Edit: the solution offered in the duplicate candidate "solves" the problem (although after the first input the questions are printed with one space indentation, for some reason I don't yet know). I'm working from an exercise book that insists the code should be transcribed exactly and makes no mention of flushing the buffer.