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
- MySQL
- PER
- node.js
- 라즈베리파이
- 함수
- PyQt
- swift
- flutter
- python
- MS-SQL
- 유니티
- 다이어트
- PyQt5
- urllib
- port
- 맛집
- Linux
- ubuntu
- IOS
- GIT
- mssql
- Excel
- pandas
- 날짜
- sqlite
- tensorflow
- ASP
- Unity
- 리눅스
- javascript
Archives
아미(아름다운미소)
Python 슬라이싱으로 문자열 나누기 본문
Python 슬라이싱으로 문자열 나누기
다음은 자주 사용하게 되는 슬라이싱 기법 중 하나이다.
B = '105109' B1 = str(B)[:2] B2 = str(B)[2:4] B3 = str(B)[4:] print(B1+':'+B2+':'+B3)>>10:51:09
'랭귀지 > python' 카테고리의 다른 글
| python 필요없는 문자, 특수문자, 공백 제거는 정규식 (0) | 2018.10.04 |
|---|---|
| Python Named colors in matplotlib (0) | 2018.10.03 |
| Python type() Check Python data type (0) | 2018.10.01 |
| Python split() join() (0) | 2018.09.29 |
| python for에서 인덱스와 요소의 값을 동시에 출력하기 (0) | 2018.09.28 |
Comments