코드
import re
def solution(skill, skill_trees):
answer = 0
for skill_tree in skill_trees :
core_skill = re.sub('[^'+skill+']', '', skill_tree)
answer += 1 if core_skill == skill[:len(core_skill)] else 0
return answer
import re
def solution(skill, skill_trees):
answer = 0
for skill_tree in skill_trees :
core_skill = re.sub('[^'+skill+']', '', skill_tree)
answer += 1 if core_skill == skill[:len(core_skill)] else 0
return answer