💻첫번째 시도 테스트케이스(O),채점결과 100점
def solution(s):
answer = True
tmp_p=0
tmp_y=0
for i in s:
if i=='p' or i=='P':
tmp_p+=1
elif i=='y' or i=='Y':
tmp_y+=1
if tmp_p!=tmp_y:
answer=False
return answer
소요시간 3분
접근방식:대소문자 관계없이라고 했으므로 소문자 대문자 둘 중 하나만 나와도 카운트가 되게함
lower함수썼어도 괜찮음
셀프 피드백:없음