반응형
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 |
Tags
- Python
- PANDAS
- Redshift
- django
- Apache
- hive
- SQL
- c#
- Java
- gas
- numpy
- list
- array
- string
- Kotlin
- GIT
- Github
- 파이썬
- Excel
- PySpark
- PostgreSQL
- Mac
- Tkinter
- google apps script
- matplotlib
- Google Excel
- dataframe
- math
- Google Spreadsheet
Archives
- Today
- Total
목록python strip (1)
달나라 노트
Python Basic : strip, lstrip, rstrip (문자열 가장 양쪽의 공백 제거하기. 문자열 가장 양쪽에 있는 특정 문자 제거하기)
Python의 strip, lstrip, rstrip은 다음과 같은 기능을 가집니다. strip = 문자열의 양쪽 끝에 있는 어떤 텍스트를 제거합니다. lstrip = 문자열의 왼쪽 끝에 있는 어떤 텍스트를 제거합니다. rstrip = 문자열의 오른쪽 끝에 있는 어떤 텍스트를 제거합니다. str_test = ' abcde ' str_stripped = '[' + str_test.strip() + ']' str_lstripped = '[' + str_test.lstrip() + ']' str_rstripped = '[' + str_test.rstrip() + ']' print(str_stripped) print(str_lstripped) print(str_rstripped) - Output [abcde] ..
Python/Python Basic
2021. 1. 20. 22:39