defcomparator(x,y):x_y=x+yy_x=y+xify_x>x_y:return1else:return-1classSolution:#@param num: A list of non negative integers#@return: A string# write your code heredeflargestNumber(self,num):# write your code hereifnum==None:returnNonestring_list=[]# change int to stringsforiinrange(len(num)):string_list.append(str(num[i]))# remove duplicate in the stringsstring_list.sort(comparator)result=""foriinstring_list:result+=i# case "0,0"index=0whileindex<len(string_list)andstring_list[index]=="0":index+=1ifindex==len(string_list):return"0"returnresult