【leetcode❤python】Find the Difference

#-*- coding: UTF-8 -*-
class Solution(object):
    def findTheDifference(self, s, t):
        
        s=sorted(list(s))
        t=sorted(list(t))
   
        for st in s:
      
            p=t.index(st)
            del t[p]

        
        return ''.join(t)
          
                
            
       
sol=Solution()
print sol.findTheDifference('abddcde', 'eabadbdccdde')

原文地址:https://www.cnblogs.com/kwangeline/p/5953693.html