다음 Python 프로그램의 실행 결과를 쓰시오.
1votes = ["oh", "yu", "an", "yu"]2cnt = {}3for v in votes:4 cnt[v] = cnt.get(v, 0) + 15print(cnt)6res = sorted(cnt.items(), key=lambda p: (-p[1], p[0]))7print(res)8print(res[-1][0] + str(len(res)))
votes = ["oh", "yu", "an", "yu"]
cnt = {}
for v in votes:
cnt[v] = cnt.get(v, 0) + 1
print(cnt)
res = sorted(cnt.items(), key=lambda p: (-p[1], p[0]))
print(res)
print(res[-1][0] + str(len(res)))
해설을 먼저 보면 이후 정답 시 점수가 50%만 반영됩니다.