title: Printing list of list (containing integers) in lexicographic order
body: <p>Task:You are given three integers  x,y and z along with an integer n. You have to print a list of all possible coordinates  where the sum of is not equal to n. Print Print the list in lexicographic increasing order.
  Below is my code. Works fine except for printing in lexicographic order. Below is my code.Is there a better approach to get lexicographic order of list containing integers?</p>
  
  <pre><code>from itertools import combinations
  lst=[]
  if __name__ == '__main__':
      x = int(input())
      y = int(input())
      z = int(input())
      n = int(input())
      lst=[[a,b,c]  for b in range(y+1) for c in range(z+1)   for a in range(x+1) ]
  
  finallst=[]
  for items in combinations(lst,3):
      for nums in items:
         x=sum(nums)
         if x!=n and nums not in finallst:
              finallst.append(nums)
  
  f_finallst= (sorted(map(str,(finallst)))) #converted to string to get lexicographic order
  print (f_finallst) 
  My result=['[0, 0, 0]', '[0, 0, 1]', '[0, 1, 0]', '[1, 0, 0]', '[1, 1, 1]']
  Expected result=[[0, 0, 0], [0, 0, 1], [0, 1, 0], [1, 0, 0], [1, 1, 1]]
  </code></pre>