Algorithm/프로그래머스
[Lv.0/Python] 짝수 홀수 개수
chocoji
2023. 7. 28. 22:44
🔗 문제
https://school.programmers.co.kr/learn/courses/30/lessons/120824
💻 Code
def solution(num_list):
result = [0, 0]
for num in num_list:
if num % 2 == 0:
result[0] += 1
else:
result[1] += 1
return result