title: How to sort a list from user input?
body: <p>I've been trying to make this work for some time now and I can't seem to get my list to sort out in ascending order. My program asks the user to enter three integers and then outputs results and is supposed to sort the numbers entered from least to greatest. However, whenever I try to sort it, it does not sort it the way I want to do. I've tried several ways of modifying the sort method, but it still does not work. For example, if I enter in 2, 10, and 5 as my three numbers, it will display it as "List: <code>[2, 10, 5]</code>".</p>
  
  <pre><code>import math
  
  print ("")
  print ("Welcome to my program!")
  print ("")
  
  v1 = input("Enter the first number: ")
  
  print ("")
  
  v2 = input("Enter the second number: ")
  
  print ("")
  
  v3 = input("Enter the third number: ")
  
  print ("")
  
  #tried to sort list here
  list1 = [int(v1), int(v2), int(v3)]
  sorted(list1, key=int)
  
  sum = int(v1) + int(v2) + int(v3)
  product = int(v1) * int(v2) * int(v3)
  integer = int(v1)//int(v2)
  mod = float(v1) % float(v2)
  average = (float(v1) + float(v2) + float(v3))/ 3
  star= "*"
  
  
  
  print ("------------------")
  print ("     RESULTS      ")
  print ("------------------")
  print ("")
  print ("Sum: " + str(sum))
  print ("")
  print ("Product: " + str(product))
  print ("")
  print ("Integer Division: "+ str(integer))
  print ("")
  print ("Mod: " + str(mod))
  print ("")
  print ("Maximum Number: ", max(list1))
  print ("")
  print ("Minimum Number: ", min(list1))
  print ("")
  print ("Average: " + str(average))
  print ("")
  #outputs the list
  print ("List: " + str(list1))
  print ("")
  
  print (v1 + " " + "".join([star] * int(v1)))
  print (v2 + " " + "".join([star] * int(v2)))
  print (v3 + " " + "".join([star] * int(v3)))
  </code></pre>