title: Identify least common number in a list python
body: <p>With a list of numbers, each number can appear multiple times, i need to find the least common number in the list. If different numbers have the same lowest frequency, the result is the one occurring last in the list. An example, the least common integer in [1, 7, 2, 1, 2] is 7 (not 2, as originally said). And the list needs to stay unsorted</p>
  
  <p>I have the following but it always sets the last entry to leastCommon</p>
  
  <pre><code>def least_common_in_unsorted(integers):
      leastCommon = integers[0]
      check = 1
      appears = 1
      for currentPosition in integers:
          if currentPosition == leastCommon:
              appears + 1
          elif currentPosition != leastCommon:
              if check &lt;= appears:
                  check = 1
                  appears = 1
                  leastCommon = currentPosition
      return leastCommon
  </code></pre>
  
  <p>Any help would be greatly appreciated</p>