문제 설명
https://programmers.co.kr/learn/courses/30/lessons/77484?language=python3
풀이 코드
def prize_winning(n):
lst = [6,6,5,4,3,2,1]
return lst[n]
def solution(lottos, win_nums):
answer = []
#최고순위
correct = 0
for lotto in lottos:
if lotto in win_nums:
correct += 1
elif lotto == 0:
correct += 1
answer.append(prize_winning(correct))
#최저순위
correct = 0
for lotto in lottos:
if lotto in win_nums:
correct += 1
answer.append(prize_winning(correct))
return answer