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>

<pre><code>user_input = input("Type some numbers: ")

numbers = user_input.split()

print(sum([int(x) for x in numbers]))
</code></pre>

python