I am trying to run a simple python program in PyCharm,
# for i in open("test"):
for i in sys.stdin or :
data = i.split()
a = int(data)
b = int(data)
When I press shift+F10 the code runs and prompts me for input. All is good.
But when I select the code and press Alt + Shit + E (Run selection) I get the following error in Python Console,
Traceback (most recent call last):
File "<input>", line 4, in <module>
TypeError: 'StdIn' object is not iterable
Why the discrepancy?