[python]문자열 내 p와 y의 개수[프로그래머스]

.·2020년 10월 11일
0

풀이 1.

Python

def solution(s): return s.lower().count('p') == s.lower().count('y')    

풀이 2.

def solution(s):return s.lower().count('p') is s.lower().count('y')
profile
http://s6820w.tistory.com/ 로 블로그 이전

0개의 댓글