Making Anagrams

  • + 0 comments

    for Python3 Platform

    def makingAnagrams(s1, s2):
        samechar = 0
        lst = list(s2)
        
        for i in s1:
            if (i in lst):
                lst.remove(i)
                samechar += 1
        
        return len(lst) + len(s1) - samechar
    
    s1 = input()
    s2 = input()
    
    result = makingAnagrams(s1, s2)
    
    print(result)