1) 나의 풀이
def solution(skill, skill_trees):
answer = 0
for tree in skill_trees:
mytree = ''.join([str1 for str1 in tree if str1 in skill])
if skill.startswith(mytree):
answer+=1
return answer
'프로그래머스 > [코테]Level2' 카테고리의 다른 글
[Python] 프린터 (0) | 2020.10.23 |
---|---|
[Python] 다리를 지나는 트럭 (0) | 2020.10.22 |
[Python] 가장큰수 (0) | 2020.10.21 |
[Python] 소수찾기 (0) | 2020.10.21 |
[Python]조이스틱 (0) | 2020.10.21 |