Algorithm/프로그래머스 연습 문제
프로그래머스 / 코딩 테스트 / 문자열 다루기 기본
Forgotten One
2020. 12. 24. 19:01
문제 설명

문제 해결
and, or 연산자를 이용해서 여러 개의 조건을 비교하는 형태의 코드를 작성하면 된다.
def solve(s):
return (len(s) == 4 or len(s) == 6) and s.isdigit()
def solution(s):
answer = solve(s)
return answer