Python basics: How to read N ints until '\n' is found in stdin
<p>Hey this is a really quick question. I guess I'll give correct answer in less than 2 minutes after posting this question.</p>

<p>I've started learning python, like 5 minutes ago, so mind the stupidity of the question. 
To test it I'm re-writing some algorithms i had. </p>

<p>Could someone tell me how can I read N ints from the input, and stop reading when I find the \n ? Also adding them to an array that I can work with?</p>

<p>something like this from C but in python</p>

<pre><code>while(scanf("%d%c",&amp;somearray[i],&amp;c)!=EOF){
    i++;
    if (c == '\n'){
        break;
    }
}
</code></pre>
