def solution(phone_number):
    answer = ''
    phone_number = str(phone_number)
    for i in range(len(phone_number)-3):
        answer = "*" * i + phone_number[-4:]
    return answer리스트 뒤부터 할때 [-4:] 이거!!!!! 꼭 기억!!!!!
'💡 Codeing Test > 프로그래머스' 카테고리의 다른 글
| [프로그래머스] 최댓값과 최솟값 (python) (1) | 2023.02.15 | 
|---|---|
| [프로그래머스] 2019 카카오 인턴 문제 : 실패율 (python) (0) | 2023.02.15 | 
| [프로그래머스] 시저암호 (python) (0) | 2023.02.14 | 
| [프로그래머스] 가장 큰 수 (python) (0) | 2023.02.05 | 
| [프로그래머스] h-Index (python) (0) | 2023.02.05 |