Notice
Recent Posts
Recent Comments
Link
아미(아름다운미소)
python 문자열에서 숫자만 제거 본문
문자열을 입력받아 그 문자열에서 숫자만 제거하고 출력
#-*- coding: utf-8 -*- ''' Created on 2018. 11. 26. @author: bhm ''' import re char = "123abcdefghi4jk56" p = re.compile("[^0-9]") print("".join(p.findall(char)))결과)
abcdefghijk
'랭귀지 > python' 카테고리의 다른 글
[python] subprocess 모듈을 이용한 명령어 실행 (0) | 2018.12.01 |
---|---|
PyQt5 메뉴바(QAction 사용) (0) | 2018.11.30 |
Python PyQt5 combobox 예제 (0) | 2018.11.26 |
python 리스트 슬라이싱 (0) | 2018.11.25 |
python json 송수신 (0) | 2018.11.24 |
Comments