title: Auto sum without need to reenter the resolved numbers list of numbers/int separated by white space
body: <p>I would like to know how to take a longish list of numbers/int separated by white spaces and work out the total/sum all in a few lines of code.</p>
  
  <p>I have tried adapting ( I am a beginner doing tutorials) some code on this site for the manual entry of integers that then sums up but I would like to see by some simple loop use that I can paste or copy the numbers in at top end and then have a sum calc at end without the need to enter the numbers into some box. I get the following code that I copied and adpated simply by changing raw_input to input for Python 3 but that produced the box. I have tried to manually define numbers at top but get a mess of errors.</p>
  
  <pre><code>&gt;&gt;&gt;mylist = input("Enter a list of numbers, SEPERATED by WHITE SPACE(3 5 66 etc.): ")
  # now you can use the split method of strings to get a list
  &gt;&gt;&gt;mylist = mylist.split() # splits on white space by default
  # to split on commas -&gt; mylist.split(",")
  
  # mylist will now look something like. A list of strings.
  ['1', '44', '56', '2'] # depending on input of course
  
  # so now you can do
  &gt;&gt;&gt;total = sum(int(i) for i in mylist)
  # converting each string to an int individually while summing as you go
  </code></pre>
  
  <p>The last line above says "summing as you go" but I want to put in the data once at the beginning and not manually feed in again to some box and then have a sum at end. I want to go straight to sum total without this need to enter into a box.
  I started trying to enter the list of numbers separated by white space as a string but got nowhere and made mistakes with the map function</p>