one limne python code using map and reduce

  • 0


    class Solution(object):
        # 389. Find the Difference
        def findTheDifference(self, s, t):
            :type s: str
            :type t: str
            :rtype: str
            return chr(reduce(lambda x, y: x ^ y, map(ord, s + t)))

Log in to reply

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