title: unpacking result of split() into fewer variables than specified
body: <p>I've been doing a bit of code where I enter some numbers,split them up into separate variables and then orders those numbers, and i can split them up fine, but when I try to split into only 4 (for example) numbers (less than the amount of variables) it returns the error 'not enough variables to unpack'. I want it so I can input the any amount of numbers (up to the max, which in this case is 10) and it will sort the given numbers, print them, but it wont print the other variables.</p>
  
  <p>I've so far done this:</p>
  
  <pre><code>a, b, c, d, e, f, g, h, i, j = input("enter up to 10 digits").split()
  nlist=(a, b, c, d, e, f, g, h, i, j)
  def bubbleSort():
      for l in range(len(nlist)-1,0,-1):
          for k in range(l):
              if nlist[k]&gt;nlist[k+1]:
                  temp = nlist[k]
                  nlist[k] = nlist[k+1]
                  nlist[k+1] = temp
  
  bubbleSort(nlist)
  print(nlist)
  </code></pre>
  
  <p>I know this is probably has a lot of mistakes, so if anyone could help me find a much more efficient/correct way of doing this, I would greatly appreciate it.</p>
  
  <p>Also, just wondering, how could i do it so once i`ve inputed the numbers i can then find the mean, mode, medium and range of the numbers?</p>