import re
string = "abcdefㄱㄴㄷㄹㅁㅂ가나다라마바사12345[]{}().,!?'`~;:"
re.sub('[^A-Za-z0-9가-힣]', '', string)
# Out: 'abcdef가나다라마바사12345'
출처: https://signing.tistory.com/74 [끄적거림]
'Python' 카테고리의 다른 글
pip install requirements.txt (0) | 2021.11.06 |
---|---|
[Python] 주피터 노트북에서 셀에서 값을 연속적으로 출력하는 방법 (0) | 2021.11.04 |
[Python] [OpenCV] 이미지 읽기 cv2.imread() (0) | 2021.09.28 |
[Python] directory 다루기 (0) | 2021.08.24 |
[Python] tqdm (0) | 2021.08.24 |