Okay so I was trying out the Google Kick Start problems for the first time when I came across this problem. For some reason when I enter multiple lines of inputs at the same time and then print in between processing each input it makes the loop run forever until I enter in a new input. Is there a simple explanation for this scenario?
x = int(input())
print('\nx =', x)
for i in range(x):
newInput = input()
print(newInput)
If I put the input as:
3
1
2
3
Then the output is:
x = 3
1
2
and then I have to press 'enter' again to see
3
Why does the program require the 2nd input to get the remaining 3 to print?
Curiously when I use the debugger mode with breakpoints on my IDE this problem disappears (no longer need to press 'enter' again).