Problem in reading till EOF in python
<p>i have a python code which should read in 2 integers from standard input till user presses Ctrl+D (i.e EOF)
  and do some processing .I tried the following code :
<code>n,k=map(int,[a for a in sys.stdin.read().split()])</code>
Here , when i enter two integers the programme accepts it and when i press Ctrl+D it shows the correct output , like:
<code>6 3</code>
but when i put in 2 pairs in intergers like:
<code>6 3
12 2</code> and then press Ctrl+D then instead of the desired result i get error that: 
[i]ValueError: Too many values to upack[/i]
So how do i correct the code for it to work properly?
I intend to have the shortest possible code for that
Thanks.</p>
