title: Removing duplicates and sorting list python
body: <p>Given a list, I need to print the numbers in sorted order and remove any duplicates. I am using python 3.7.2</p>
  
  <p><strong>My code:</strong></p>
  
  <pre><code>def sorted_elements(numbers):
      return sorted(set(numbers))
  
  testcase = int(input())
  while testcase &gt; 0:
     numbers = input().split()
     l = sorted_elements(numbers)
  
     for x in l:
        print (x, end = ' ')
  
     print ()
     testcase -= 1
  </code></pre>
  
  <p>However, whenever my input consists of a 2 digit number, the logic fails.
  Eg. for input of <code>2 1 43 2 5</code>, I get an output of <code>1 2 43 5</code>.</p>
  
  <p>This work perfectly for single digit numbers. Can someone help me out with this?</p>