키포인트: 문자열 리스트 정렬!
def solution(phone_book):
answer = True
phone_book.sort()
l = len(phone_book)
for i in range(0, l-1):
if len(phone_book[i]) < len(phone_book[i+1]) and phone_book[i+1].startswith(phone_book[i]):
return False
# for j in range(i+1, l):
# if phone_book[i][0] != phone_book[j][0]:
# break
# if phone_book[j].startswith(phone_book[i]):
# return False
return answer