# 튜플(Tuple)

듀플은 리스트와 비슷하지만 만들어지고 나서 수정할 수 없다는 특성이있습니다.\
여러명이 협업을 하거나, 내가 만든 어떠한 코드에서 값을 변경 시킬 수 있는데 이를 방지하기 위해 사용하기 좋습니다.\
듀플에서 데이터를 가져오는 방법은 리스트와 같습니다.

## 만들기

튜플은 소괄호(( ))를 사용해서 만듭니다.

```python
tp = (1,2,3,4)
print(tp)
```

## 사용하기

리스트의 값 하나 가져오기, 여러게 가져오기 길이 구하기 등 모두 사용 가능합니다.\
하지만 생성된 튜플은 수정이 되지 않으니 정렬, 순서 변경 등은 되지 않습니다.

```
tp = (1,2,3,4)
print(tp[1])
print(tp[0:3])
print(len(tp))
```

02  2번째 값 가져오기\
03  1번째 부터 3번째 값 까지 가져오기\
03  튜플의 크기&#x20;


---

# Agent Instructions: 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:

```
GET https://study-code.gitbook.io/python-basic/undefined-1/undefined-5-1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
