def solution(s1, s2): cnt=0 for i in s1: for j in s2: if i==j: cnt +=1 return cnt
이중 for문을 사용하여 배열 s1과 s2의 있는 값이 같은지 비교하여 같다면 개수를 +1 해줍니다.