def recursive_sort(obj):
 if isinstance(obj, dict):
  for v in obj.values():
   recursive_sort(v)
 elif isinstance(obj, list):
  obj.sort()
  for i in obj:
   recursive_sort(i)
 return obj

def recursive_sort ( obj ) : if isinstance ( obj , dict ) : for v in obj . values ( ) : recursive_sort ( v ) elif isinstance ( obj , list ) : obj . sort ( ) for i in obj : recursive_sort ( i ) return obj
recursively sort list in iterables for comparison .