"""
Given two strings, find the number of common characters between them.

Example

For s1 = "aabcc" and s2 = "adcaa", the output should be
commonCharacterCount(s1, s2) = 3.

Strings have 3 common characters - 2 "a"s and 1 "c".

Input/Output

    [execution time limit] 4 seconds (py3)

    [input] string s1

    A string consisting of lowercase latin letters a-z.

    Guaranteed constraints:
    1 ≤ s1.length ≤ 15.

    [input] string s2

    A string consisting of lowercase latin letters a-z.

    Guaranteed constraints:
    1 ≤ s2.length ≤ 15.

    [output] integer
"""

def commonCharacterCount(s1, s2):
    s2 = list(s2)
    common = 0
    for i in s1:
        if i in s2:
            common += 1
            s2.remove(i)
    return common

b3a5193522232692117a2ad341b6be2d7d888dc5
<mask token>

<mask token>


def commonCharacterCount(s1, s2):
    s2 = list(s2)
    common = 0
    for i in s1:
        if i in s2:
            common += 1
            s2.remove(i)
    return common

"""
Given two strings, find the number of common characters between them.

Example

For s1 = "aabcc" and s2 = "adcaa", the output should be
commonCharacterCount(s1, s2) = 3.

Strings have 3 common characters - 2 "a"s and 1 "c".

Input/Output

    [execution time limit] 4 seconds (py3)

    [input] string s1

    A string consisting of lowercase latin letters a-z.

    Guaranteed constraints:
    1 ≤ s1.length ≤ 15.

    [input] string s2

    A string consisting of lowercase latin letters a-z.

    Guaranteed constraints:
    1 ≤ s2.length ≤ 15.

    [output] integer
"""

def commonCharacterCount(s1, s2):
    s2 = list(s2)
    common = 0
    for i in s1:
        if i in s2:
            common += 1
            s2.remove(i)
    return common
