Closed ji-0630 closed 1 year ago
def solution(spell, dic):
ans= 0
for i in dic:
for j in spell:
if j in i:
ans += 1
if ans == len(spell):
return 1
else:
ans = 0
return 2
def solution(spell, dic):
for d in dic:
if sorted(d) == sorted(spell):
return 1
return 2
문제 설명