이미지


코드 입력

![이미지](/images/self_dev/programmers/프로그래머스-Python-특정-문자-제거하기-html_20240629/img_1.png)
 
어렵지 않은 문제이다.
 
python의 replace 함수를 안다면 금방 풀리는 문제이다.
 
replace는 _**대상 문자열의 특정 문자를 치환하는 역할**_ 을 한다.
 
    ## 1번 예시 (l을 빈 값으로 치환)
    "hello".replace("l", "")
    
    ## 출력
    heo
    
    ## 2번 예시 (t를 p로 치환)
    "string".replace("t", "p")
    
    ## 출력

주어진 my_string에서 replace 메서드를 호출해서 제거해야 할 문자를 replace로 빈 값으로 치환하면 된다.


🔗 프로그래머스 (opens in a new tab)