> For the complete documentation index, see [llms.txt](https://nmdkims-organization.gitbook.io/python-hand-book/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nmdkims-organization.gitbook.io/python-hand-book/day1./1.-numbers-strings-lists-dictionaries/tuple.md).

# 튜플(tuple)

기본 데이터 중 튜플로 구성된 것에 대한 예제 입니다.

{% hint style="info" %}
**튜플**

```
튜플은 리스트와 비슷합니다.
```

```
다른 점으로는 리스트는 [] 튜플은 ()
```

```
리스트는 요소의 생성, 삭제, 수정이 가능함 (변경가능)
```

```
튜플은 요소의 값을 바꿀 수 없습니다 (변경불가능)
```

```
요소의 값을 변화시킬수 없다는 점을 제외하고는 완전히 동일합니다.
```

```
즉 인덱싱, 슬라이싱, 더하기, 곱하기, 길이구하기가 가능합니다.
```

{% endhint %}

<pre class="language-python"><code class="lang-python"><strong>base_tuple = (1,2,3,4)
</strong>
plus_tuple = (5, 6)

print(base_tuple[2]) # 3
print(base_tuple[1:]) # (2,3,4)
print(base_tuple + plus_tuple) # (1,2,3,4,5,6)
print(base_tuple * 2) # (1,2,3,4,1,2,3,4)
print(len(base_tuple)) # 4
</code></pre>
