> For the complete documentation index, see [llms.txt](https://sdc-james.gitbook.io/onebook/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sdc-james.gitbook.io/onebook/3./3.9.-strings/3.9.5..md).

# 4.9.5.     내장 문자열 함수

Python에는 문자열을 조작하는 다음과 같은 내장 메서드가 포함되어 있습니다.

| [**capitalize()**](https://www.tutorialspoint.com/python/string_capitalize.htm) 문자열의 첫 글자를 대문자로 바꿉니다.                                                                                                               |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [**center(길이, 추가할 문자)**](https://www.tutorialspoint.com/python/string_center.htm) 원래 문자열 앞뒤에 주어진 길이가 되도록 추가할 문자를 채워서 반환합니다.                                                                                         |
| [**count(str, beg= 0,end=len(string))**](https://www.tutorialspoint.com/python/string_count.htm) 문자열에 시작 인덱스 beg와 종료 인덱스 end 사이에 주어진 문자열 str이 몇 번 발생하는지 계산                                                          |
| [**endswith(suffix, beg=0, end=len(string))**](https://www.tutorialspoint.com/python/string_endswith.htm) 문자열 또는 부분 문자열 (시작 색인 beg 및 종료 색인 end가 지정된 경우)이 접미어로 끝나는 지 여부를 결정합니다. 있으면 true를 반환하고 그렇지 않으면 false를 반환합니다. |
| [**expandtabs(tabsize=8)**](https://www.tutorialspoint.com/python/string_expandtabs.htm) 문자열의 탭을 여러 공백으로 확장합니다. 탭 크기가 제공되지 않으면 탭 당 8 공백이 기본값입니다.                                                                    |
| [**find(str, beg=0 end=len(string))**](https://www.tutorialspoint.com/python/string_find.htm) 문자열의 beg에서 end까지 부분 문자열이 발생하는지 확인합니다. 발견되면 색인을 반환하고 그렇지 않으면 -1을 반환합니다.                                                |
| [**index(str, beg=0, end=len(string))**](https://www.tutorialspoint.com/python/string_index.htm) find ()와 동일하지만, str이 발견되지 않으면 예외 에러가 발생합니다.                                                                        |
| [**isalnum()**](https://www.tutorialspoint.com/python/string_isalnum.htm) 문자열이 1 문자 이상이고 모든 문자가 영숫자의 경우는 true, 그렇지 않은 경우는 false를 돌려줍니다.                                                                             |
| [**isalpha()**](https://www.tutorialspoint.com/python/string_isalpha.htm) 문자열이 1 문자 이상이고 모든 문자가 영문자의 경우는 true, 그렇지 않은 경우는 false를 돌려줍니다.                                                                             |
| [**isdigit()**](https://www.tutorialspoint.com/python/string_isdigit.htm) 문자열에 숫자 만 포함되어 있으면 true를 반환하고 그렇지 않으면 false를 반환합니다.                                                                                       |
| [**islower()**](https://www.tutorialspoint.com/python/string_islower.htm) 문자열이 1 문자 이상이고 모든 문자가 소문자인 경우는 true, 그렇지 않은 경우는 false를 리턴.                                                                                |
| [**isnumeric()**](https://www.tutorialspoint.com/python/string_isnumeric.htm) 유니코드 문자열에 숫자만 포함되어 있으면 true를 반환하고 그렇지 않으면 false를 반환.                                                                                  |
| [**isspace()**](https://www.tutorialspoint.com/python/string_isspace.htm) 문자열에 공백 문자가 있으면 true를 그렇지 않으면 false를 리턴.                                                                                                  |
| [**istitle()**](https://www.tutorialspoint.com/python/string_istitle.htm) 첫문자는 대문자 나머지는 소문자인 "titlecased"가 올바르게 지정되어 있는 경우는 true, 그렇지 않은 경우는 false                                                                  |
| [**isupper()**](https://www.tutorialspoint.com/python/string_isupper.htm) 문자열이 1 문자 이상이고 모든 문자가 대문자인 경우는 true, 그렇지 않은 경우는 false를 리턴.                                                                                |
| [**join(seq)**](https://www.tutorialspoint.com/python/string_join.htm) 문자열 seq에 있는 문자열을 분리 문자열로 연결                                                                                                                  |
| [**len(string)**](https://www.tutorialspoint.com/python/string_len.htm) 문자열의 길리                                                                                                                                     |
| [**ljust(width\[, fillchar\])**](https://www.tutorialspoint.com/python/string_ljust.htm) 원래 문자열 왼쪽에 총 width 열 공백으로 채워진 문자열을 반환.                                                                                     |
| [**lower()**](https://www.tutorialspoint.com/python/string_lower.htm) 모든 대문자를 소문자로 변환                                                                                                                               |
| [**lstrip()**](https://www.tutorialspoint.com/python/string_lstrip.htm) 문자열의 모든 선행 공백을 제거                                                                                                                           |
| [**maketrans()**](https://www.tutorialspoint.com/python/string_maketrans.htm)  translate 함수에서 사용할 변환 테이블을 반환                                                                                                        |
| [**max(str)**](https://www.tutorialspoint.com/python/string_max.htm)  문자열 str에서 최대 알파벳 문자를 반환                                                                                                                       |
| [**min(str)**](https://www.tutorialspoint.com/python/string_min.htm)  문자열 str에서 최소 알파벳 문자를 반환                                                                                                                       |
| [**replace(old, new \[, max\])**](https://www.tutorialspoint.com/python/string_replace.htm)  문자열에서 모든 old 항목을 new 로 변경.                                                                                             |
| [**rfind(str, beg=0,end=len(string))**](https://www.tutorialspoint.com/python/string_rfind.htm)  find ()와 동일하지만 문자열 뒤에서 검색                                                                                          |
| [**rindex( str, beg=0, end=len(string))**](https://www.tutorialspoint.com/python/string_rindex.htm) index ()와 같지만 문자열 뒤에서 검색                                                                                        |
| [**rjust(width,\[, fillchar\])**](https://www.tutorialspoint.com/python/string_rjust.htm) 원래 문자열 오른쪽에 총 width 열 공백으로 채워진 문자열을 반환.                                                                                   |
| [**rstrip()**](https://www.tutorialspoint.com/python/string_rstrip.htm)  문자열의 모든 공백을 제거                                                                                                                             |
| [**split(str="", num=string.count(str))**](https://www.tutorialspoint.com/python/string_split.htm)  구분 기호 str (제공되지 않은 경우 공백)에 따라 문자열을 분할하고 하위 문자열 목록을 반환                                                           |
| [**splitlines( num=string.count('\n'))**](https://www.tutorialspoint.com/python/string_splitlines.htm) 문자열을 모두 (또는 num) NEWLINE에서 분할하고 NEWLINE이 제거 된 각 줄의 목록을 반환                                                    |
| [**startswith(str, beg=0,end=len(string))**](https://www.tutorialspoint.com/python/string_startswith.htm) 문자열이 부분문자열 str로 시작하는지 판단. 있으면 true를 반환하고 그렇지 않으면 false를 반환                                                |
| [**strip(\[chars\])**](https://www.tutorialspoint.com/python/string_strip.htm)  문자열에 대해 lstrip () 및 rstrip ()을 수행                                                                                                   |
| [**swapcase()**](https://www.tutorialspoint.com/python/string_swapcase.htm)  문자열의 모든 대소문자를 스왑                                                                                                                       |
| [**title()**](https://www.tutorialspoint.com/python/string_title.htm) 문자열의 "titlecased"버전을 반환. 즉, 모든 단어는 대문자로 시작하고 나머지는 소문자로 변환됩니다.                                                                                 |
| [**translate(table, deletechars="")**](https://www.tutorialspoint.com/python/string_translate.htm) 문자열을 변환 테이블 str(256 문자)에 따라 변환하고 deletechars의 문자를 제거.                                                            |
| [**upper()**](https://www.tutorialspoint.com/python/string_upper.htm)  문자열의 소문자를 대문자로 변환                                                                                                                            |
| [**zfill (width)**](https://www.tutorialspoint.com/python/string_zfill.htm). 총 width 문자에 0으로 왼쪽 패딩 된 원래 문자열을 반환                                                                                                     |
| [**isdecimal()**](https://www.tutorialspoint.com/python/string_isdecimal.htm)  유니코드 문자열에 decimal 문자 만 들어 있으면 true를 그렇지 않으면 false를 반환                                                                                |
