Simple input EOF problem

sum=0
while(True):
i=[int(x) for x in input().split()]
sum=sum+i
if(sum>=0):
print(i)
else:
break

error–Traceback (most recent call last):
File “source”, line 3, in
i=[int(x) for x in input().split()]
EOFError: EOF when reading a line

how to get rid of it?

use i = int(input()) as shown in videos.
also see while running using run code , write custom input dont keep that empty otherwise it will generate eof error .