알고리즘 프로그래머스 문제풀이

알고리즘 프로그래머스 문제풀기 핸드폰 번호 가리기

이준민1 2024. 5. 13. 16:37

def solution(phone_number):
    star = '*'*(len(phone_number)-4)
    behind4 = phone_number[-4:]
    phone = star+behind4
    return phone

# 폰번호 길이 -4까지를 *로 바꾸는 구문
#뒤에 4번호를 불러오는 구문
#두개를 합치는 구문
#출력