> 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.3..md).

# 4.9.3.     문자열 연산자

문자열 변수 **a** 는 'Hello' 그리고 **b** 는 'Python'이 할당 되어 있다고 한다면 문자열 연산의 결과는 다음과 같습니다.

| Operator | Description                                                                                                                                                            | Example                                |
| -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------- |
| +        | 연산자의 양쪽의 값을 더합니다.                                                                                                                                                      | a + b = HelloPython                    |
| \*       | 동일한 문자열의 여러 복사본을 연결하여 새 문자열을 만든다.                                                                                                                                      | a\*2 =HelloHello                       |
| \[]      | Slice - 주어진 색인에서 문자를 가져온다.                                                                                                                                             | a\[1] = e                              |
| \[ : ]   | Range Slice - 주어진 범위의 문자들을 가져온다.                                                                                                                                       | a\[1:4] = ell                          |
| in       | 지정된 문자열에 문자가 있으면 true를 반환합니다.                                                                                                                                          | H in a = 1                             |
| not in   | 지정된 문자열에 문자가 없으면 true를 반환합니다.                                                                                                                                          | M not in a = 1                         |
| r/R      | Raw String - 이스케이프 문자의 실제 의미를 해제합니다. 원시 문자열의 구문은 원시 문자열 연산자 인 따옴표 앞에 오는 문자 "r"을 제외하고는 일반 문자열과 완전히 동일하게 취급합니다. "r"은 소문자 (r) 또는 대문자 (R) 일 수 있으며 첫 번째 따옴표 바로 앞에 배치해야 합니다. | <p>Print(r'\n')</p><p>Print(R'\n')</p> |
| %        | 문자열 포맷 연산                                                                                                                                                              | 다음 섹션 참조                               |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://sdc-james.gitbook.io/onebook/3./3.9.-strings/3.9.3..md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
