Trying to take input from stdin and convert to integer for sum
<p>Very new to Python.
Trying to take inputs from stdin in the form of numbers ex. 416 2876 2864 8575 9784 and convert to int for sum of all using a loop.</p>

<p>Having a terrible time just converting to int for use in a loop. Would like to get a hint on the integer issue and then try to solve myself. Was trying to test my code to print the integers after conversion.</p>

<p>currently have:</p>

<pre><code>import sys
s=sys.stdin
n=(sys.stdin.split())
while (int(n) &gt;= 1):
    print(n)
</code></pre>

<p>You probably don't want to use <code>sys.stdin</code> directly.  Use <code>input()</code> instead.</p>

<pre><code>line = input("Enter some numbers: ")

total = 0

for n in line.split():
    total = total + int(n)

print("The total is: %d" % total)
</code></pre>

python