[파이썬3 코딩테스트] 문자열 내 p와 y의 개수

Sy Rhee·2023년 2월 6일
0

문제 설명 및 제한 조건

나의 풀이

def solution(s):
    if s.count('P')+s.count('p')==s.count('Y')+s.count('y'):
        return True
    else:
        return False
profile
hello

0개의 댓글