코딩테스트
프로그래머스 카드 뭉치 파이썬
yolang
2024. 8. 1. 21:37
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