문자열의 기초를 다루는 문제
숫자의 합(11720) [브론즈 IV]
N = input()
number = input()
print(sum(int(each) for each in list(number)))
"""
input()
print(sum(map(int, input())))
"""
- Python의 
input 메소드는 기본적으로 문자열로 입력 받음을 이용했다. 
- 또한 Python의 문자열은 
list 메소드를 통해 각각의 문자로 이루어진 리스트로 변환할 수 있다. 
- 하단처럼 
map 메소드를 활용할 수 있다. map object를 반환하는데, sum 메소드를 지원한다. 

단어 공부(1157) [브론즈 I]
from collections import defaultdict
word = list(map(str, input().upper()))
word_dict = defaultdict(int)
for w in word:
    word_dict[w] += 1
rank = [(key, value) for key, value in word_dict.items()]
rank = sorted(rank, key= lambda x: x[1])
if len(rank) > 1 and rank[-1][1] == rank[-2][1]:
    print('?')
else:
    print(rank[-1][0])
dictionary 자료형을 제대로 다루려면 lambda가 필수인 것 같다. 
- 위의 코드에서처럼 
dictionary를 tuple로 이루어진 list로 변환 후, 
lambda로 tuple 상 2번째에 위치한 값(빈도수)를 기준으로 정렬한다. 
