title: Unable to convert arguments
body: <p>I want to sort the numbers in a list based on the last digit.</p>
  <p>Here is my code:</p>
  <pre><code>import sys
  list1 = sys.argv[1]
  list1_split = list1.split(&quot;,&quot;)
  
  sorted_numbers = sorted(list1_split, key=lambda x: x%10)
  print(&quot;Sorted numbers are: &quot;, sorted_numbers)
  </code></pre>
  <p>This is what I get on the command prompt:</p>
  <pre><code>C:\Users\john\pythonprojects\test1&gt; testing.py 45,60,51,24,62,49
  Traceback (most recent call last):
    File &quot;C:\Users\john\pythonprojects\test1\testing.py&quot;, line 6, in &lt;module&gt;
      sorted_numbers = sorted(list1_split, key=lambda x: x % 10)
    File &quot;C:\Users\john\pythonprojects\test1\testing.py&quot;, line 6, in &lt;lambda&gt;
      sorted_numbers = sorted(list1_split, key=lambda x: x % 10)
  TypeError: not all arguments converted during string formatting
  </code></pre>
  <p>The expected output should be: <code>[60, 51, 62, 24, 45, 49]</code></p>
  <p>I can't figure out how to solve this error</p>