Python 1 line easy


  • 0
    G

    my code,easy to understand:

    class Solution(object):
        def findTheDifference(self, s, t):
            return [i for i in t if i not in s or s.count(i)!=t.count(i)][0]
            
    

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.