The smallest python solution


  • 0
    V

    Hi All,

    This is the most compact and optimized solution that I could come up with python.
    '''
    class Solution:
    def findTheDifference(self, s, t):
    for i in s:
    t=t.replace(i,"")
    print(""%s"" % t)
    return t

    '''
    Cheers!
    Vishal


Log in to reply
 

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