---
id: python-data-types
title: "Python Data Types"
category: "Programming_Language"
status: "draft"
verification_status: "conceptual"
canonical_id: ""
aliases: ["Built-in Data Types", "파이썬 자료형"]
duplicate_of: ""
source_trust_level: "B"
confidence_score: 0.9
created_at: 2026-07-04
updated_at: 2026-07-04
review_reason: ""
merge_history: []
tags: ["python", "programming", "w3schools", "datatypes"]
raw_sources: ["https://www.w3schools.com/python/python_datatypes.asp"]
applied_in: []
github_commit: ""
---

# [[Python Data Types]]

## 🎯 한 줄 통찰 (One-line insight)
Python's built-in types span nine categories — text, three numeric, three sequence/collection families, mapping, set, boolean, three binary, and None — and each has both an implicit literal form and an explicit constructor-function form. [S1]

## 🧠 핵심 개념 (Core concepts)
- **Text Type** — `str`. [S1]
- **Numeric Types** — `int`, `float`, `complex`. [S1]
- **Sequence Types** — `list`, `tuple`, `range`. [S1]
- **Mapping Type** — `dict`. [S1]
- **Set Types** — `set`, `frozenset`. [S1]
- **Boolean Type** — `bool`. [S1]
- **Binary Types** — `bytes`, `bytearray`, `memoryview`. [S1]
- **None Type** — `NoneType`. [S1]
- **`type()` function** — reveals any object's current data type. [S1]

## 🧩 추출된 패턴 (Extracted patterns)
- **Literal vs. constructor duality** — every type can be set via a literal (`x = 20`) or via an explicit constructor function (`x = int(20)`) — the constructor form is what [[Python Casting]] relies on. [S1]

## 📖 세부 내용 (Details)
- Literal assignment examples: `x = "Hello World"` (str), `x = 20` (int), `x = 20.5` (float), `x = 1j` (complex), `x = ["apple","banana","cherry"]` (list), `x = ("apple","banana","cherry")` (tuple), `x = range(6)` (range), `x = {"name":"John","age":36}` (dict), `x = {"apple","banana","cherry"}` (set), `x = frozenset({...})` (frozenset), `x = True` (bool), `x = b"Hello"` (bytes), `x = bytearray(5)` (bytearray), `x = memoryview(bytes(5))` (memoryview), `x = None` (NoneType). [S1]
- Constructor-function equivalents: `str()`, `int()`, `float()`, `complex()`, `list()`, `tuple()`, `range()`, `dict()`, `set()`, `frozenset()`, `bool()`, `bytes()`, `bytearray()`, `memoryview()`. [S1]

## ⚖️ 모순 및 업데이트 (Contradictions & updates)
소스에서 모순되는 정보는 발견되지 않음.

## 🛠️ 적용 사례 (Applied in summary)
현재 발견된 실제 적용 사례가 없습니다 — 이 문서에서 정의한 9개 타입 카테고리가 각각 이후 전용 챕터(Strings/Numbers/Lists/Tuples/Sets/Dictionaries/bytes/bytearray/memoryview)로 이어진다. [S1]

## 💻 코드 패턴 (Code patterns)
Type via literal vs. constructor (Python):
```python
x = 20        # literal -> int
x = int(20)   # constructor -> int
print(type(x))
```

## ✅ 검증 상태 및 신뢰도
- **상태:** draft
- **검증 단계:** conceptual
- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body)
- **신뢰 점수:** 0.90
- **중복 검사 결과:** 신규 생성 (New discovery)

## 🔗 지식 그래프 (Knowledge Graph)
- **상위/루트:** [[Python Tutorial]]
- **관련 개념:** [[Python Numbers]], [[Python Strings]], [[Python Lists]], [[Python Dictionaries]], [[Python Casting]]
- **참조 맥락:** Python 타입 시스템 전체 개론 — 이후 각 타입별 전용 챕터의 상위 문서.

## 📚 출처 (Sources)
- [S1] W3Schools — Python Data Types — https://www.w3schools.com/python/python_datatypes.asp

## 📝 변경 이력 (Change history)
- 2026-07-04: Initial draft synthesized from the W3Schools "Python Data Types" page (Astra wiki-curation, P-Reinforce v3.1 format).
