반응형
250x250
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 |
Tags
- IntelliJ
- Python
- chartjs
- codebuild
- codedeploy error
- COALESCE
- or some instances in your deployment group are experiencing problems.
- chart.js
- Airflow
- Flux
- codepipeline
- Spring Error
- 도커
- Spring
- Jenkins
- kubeflow
- Kafka
- SQL
- bootstrap
- docker
- node
- JavaScript
- java bigdecimal
- redis
- aws cicd
- aws
- PostgreSQL
- AWS CI/CD 구축하기
- VPN
- codedeploy
Archives
- Today
- Total
Small Asteroid Blog
[python] 배열 뒤에서부터 출력 [::] 본문
728x90
뒤에서 3개만 출력
a = "abc1234가나다"
print(a[-3:])
# 가나다
뒤에 3개 빼고 출력
a = "abc1234가나다"
print(a[:-3])
# abc1234
뒤에서부터 출력
a = "abc1234가나다"
print(a[::-1])
# 다나가4321cba
728x90
반응형
'백엔드 > Python' 카테고리의 다른 글
[Python] Pool, ThreadPoolExecutor 비교 (0) | 2025.03.10 |
---|---|
[python] 파이썬에서 날짜 포맷 변경하기 (0) | 2022.03.16 |
[python error] 'euc_kr' codec can't decode byte 0xbf in position 2: illegal multibyte sequence (0) | 2022.02.01 |
[python] dataframe 숫자만 추출, 숫자+문자 추출 (데이터 전처리) (0) | 2022.01.26 |
[python] 'in <string>' requires string as left operand, not float (0) | 2022.01.26 |