The pattern of checking to see if a key is already in a dictionary and assuming a default value if the key is not there is so common that there is a method called get() that does this for us if name in counts: x = counts[name] else: x = 0 위의 식은 count라는 key를 모아놓은 리스트 안에 name이 있을 경우, x를 value값으로 출력하고, 없을 경우 0을 출력하는 코드이다. key가 이미 있는지 확인하는 이 패턴은 너무 많이 사용하기 때문에 get이라는 메서드로 더 간편하게 확인해볼 수 있다. x = count..