title: Adding value and sorting them in python class
body: <p>I would like to form a list by adding numbers one by one. When numbers is added, the list will be sorted by ascending. For this reason, I wrote codes as below but when I execute these codes, the order of numbers in the list become as I added. What is wrong with these codes?</p>
  
  <pre><code>class SortList:
      theList = []
      theempty = []
  
      def sorttheList(self,number):
          self.theempty.append(number)
          for i in range(len(self.theempty)):
              mini = min(self.theempty)
              self.theList.append(mini)
              self.theempty.remove(mini)
      return self.theList
  
      def printList(self):
          return print(self.theList)
  
  lst = SortList()
  lst.sorttheList(2)
  lst.sorttheList(4)
  lst.sorttheList(9)
  lst.sorttheList(15)
  lst.sorttheList(0)
  
  lst.printList()
  </code></pre>