Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- port
- python
- PyQt5
- PER
- MySQL
- node.js
- 맛집
- sqlite
- GIT
- javascript
- 함수
- Linux
- IOS
- ubuntu
- tensorflow
- flutter
- ASP
- 리눅스
- PyQt
- Excel
- 다이어트
- MS-SQL
- 유니티
- swift
- urllib
- pandas
- 라즈베리파이
- mssql
- Unity
- 날짜
Archives
아미(아름다운미소)
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