문제 설명

나의 풀이

from numpy import count_nonzero

def solution(lottos, win_nums):
    answer = []
    count = 0
    rank = [6, 6, 5, 4, 3, 2, 1]
    for i in lottos:
        if i in win_nums:
            count += 1
    max = count + lottos.count(0)
    if max > 6: max = 6
    answer = [rank[max], rank[count]]

    print(answer)
    return answer

lottos = [44, 1, 0, 0, 31, 25]
win_nums = [31, 10, 45, 1, 6, 19]

solution(lottos, win_nums)

구글링한거