title: Unable to understand __lt__ method
body: <p>Hi I was solving this question on leetcode [Given a list of non-negative integers, arrange them such that they form the largest number.]  I saw this solution.
  I'm unable to understand how is the class LargerNumKey is working? Also, what is the purpose <strong>lt</strong> . and what are the variables x and y</p>
  <pre><code>class LargerNumKey(str):
      def __lt__(x, y):
          return x+y &gt; y+x
          
  class Solution:
      def largestNumber(self, nums):
          largest_num = ''.join(sorted(map(str, nums), key=LargerNumKey))
          return '0' if largest_num[0] == '0' else largest_num
  </code></pre>