I want to be able to keep on taking input in my program until input of EOF is given. I know how to do it in c and I would like the corresponding code in python.
Input is: 1 2 3 EOF
Output is: 1 2 3
Here is the code in c:
while(scanf("%lld",&num)!=EOF)
{
printf("%lld\n",num);
}