파이썬 문자열 특정문자 제거 : str.replace('타겟str','대체str')

horiz.d·2021년 12월 2일
0

파이썬 꿀단지

목록 보기
30/35
st = 'https://blog.naver.com/he12569'
st = st.replace("https://blog.naver.com/","")
print(st)
 
ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ
> 'he12569'

Process finished with exit code 0

REF :
https://god-gil.tistory.com/32

https://www.delftstack.com/ko/howto/python/remove-certain-characters-from-string-python/

profile
가용한 시간은 한정적이고, 배울건 넘쳐난다.

0개의 댓글