728x90
📌오늘의 학습 키워드
- 쉬운 문제
✨공부한 내용 본인의 언어로 정리하기
- 리스트 사용
📚오늘의 회고
-
- 흠... 미들러 문제 치고 너무 쉬운거 같다..
[🤓문제 해결 코드]
def solution(cards1, cards2, goal):
answer = ''
for word in goal:
if cards1 and cards1[0] == word:
cards1.pop(0)
continue
if cards2 and cards2[0] == word:
cards2.pop(0)
continue
return "No"
return "Yes"
728x90
'코딩테스트' 카테고리의 다른 글
백준 10815 숫자 카드 파이썬 (0) | 2024.08.03 |
---|---|
프로그래머스 H-Index 파이썬 (0) | 2024.08.02 |
프로그래머스 이중우선순위큐 파이썬 (0) | 2024.07.31 |
프로그래머스 더 맵게 파이썬 (0) | 2024.07.30 |
프로그래머스 기능개발 (0) | 2024.07.29 |