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
- SSH
- Visual Studio
- 오류
- pip
- JSON
- label
- YOLO
- 기타 연주
- 핑거스타일
- 컨테이너
- error
- C
- windows forms
- Numpy
- paramiko
- Docker
- 프로그래머스
- C++
- mysql
- Selenium
- pandas
- 채보
- ubuntu
- VS Code
- C#
- nvidia-smi
- OpenCV
- Python
- Linux
- pytorch
Archives
- Today
- Total
기계는 거짓말하지 않는다
Python String 문자 수정(Modify) 본문
문자열은 immutable이므로 문자 수정이 불가능하다.
List 변경 후 다시 문자열로 변환하는 방법이 있다.
temp_str = "ABCDEF"
temp_str = list(temp_str)
temp_str[0] = "g"
temp_str[1] = "h"
temp_str = "".join(temp_str)
print(f"Change String: {temp_str} (Type: {type(temp_str)})")
'Python' 카테고리의 다른 글
Python 추상 클래스 (Abstract Class) (0) | 2022.12.03 |
---|---|
Python OpenCV imread, imwrite 한글 문제 (0) | 2022.11.25 |
List remove 반복 활용 없이 필요한 값만 남기고 제거 (0) | 2022.11.18 |
OpenCV video read 시 프레임 회전 문제 (0) | 2022.11.04 |
Python 디렉터리 내 파일 경로 텍스트 저장 (0) | 2022.10.30 |
Comments