Files
2nd/10_Wiki/Dev/Topic_Python/Python_Lists.md
T
Antigravity Agent 1cfd3bbb56 docs(10_Wiki): 위키 구조 정리 — 언어 튜토리얼 카테고리 폴더 제거 + 신규 자산 동기화
Topic_CSS/Topic_HTML/Topic_JavaScript/Topic_Prompt/Topic_Comfyui 등 기존 카테고리 폴더를 정리하고,
Topic_Graphic/Dev 등 신규 산출물과 Topics 내부 세션/메모리 기록을 동기화.
2026-07-05 00:10:59 +09:00

4.1 KiB

id, title, category, status, verification_status, canonical_id, aliases, duplicate_of, source_trust_level, confidence_score, created_at, updated_at, review_reason, merge_history, tags, raw_sources, applied_in, github_commit
id title category status verification_status canonical_id aliases duplicate_of source_trust_level confidence_score created_at updated_at review_reason merge_history tags raw_sources applied_in github_commit
python-lists Python Lists Programming_Language draft conceptual
파이썬 리스트
B 0.9 2026-07-04 2026-07-04
python
programming
w3schools
lists
https://www.w3schools.com/python/python_lists.asp

Python Lists

🎯 한 줄 통찰 (One-line insight)

Lists are one of Python's four collection types — ordered, changeable, duplicate-allowing, and mixed-type-capable — distinguished from Tuple (unchangeable), Set (unordered, no duplicates), and Dictionary (key-value, no duplicates). [S1]

🧠 핵심 개념 (Core concepts)

  • List — stores multiple items in a single variable; created with square brackets. [S1]
  • Ordered — items have a defined order that persists (new items go to the end) unless a method explicitly reorders them. [S1]
  • Changeable (mutable) — items can be changed, added, or removed after creation. [S1]
  • Allows duplicates — since lists are indexed, identical values can appear multiple times. [S1]
  • Mixed types — a single list can hold strings, ints, booleans together. [S1]
  • list() constructor — alternative creation syntax: list(("apple", "banana", "cherry")). [S1]
  • Four collection types compared — List (ordered, changeable, duplicates OK), Tuple (ordered, unchangeable, duplicates OK), Set (unordered, effectively unchangeable, no duplicates), Dictionary (ordered since 3.7, changeable, no duplicate keys). [S1]

⚖️ 비교 및 선택 기준 (Comparison & decision criteria)

항목 (Option) 장점 단점 언제 선택
List 순서 보장, 변경 가능, 중복 허용 Set 대비 멤버십 검사가 느림 순서가 중요하고 자주 수정되는 컬렉션
Tuple 불변이라 안전, 해시 가능 생성 후 수정 불가 변경되면 안 되는 고정 데이터
Set 빠른 멤버십 검사, 중복 자동 제거 순서 없음, 인덱싱 불가 고유값 집합 연산이 필요할 때
Dictionary 키로 빠른 조회, 3.7+부터 순서 보장 중복 키 불가 이름-값 매핑이 필요할 때

📖 세부 내용 (Details)

  • Basic creation: thislist = ["apple", "banana", "cherry"]. [S1]
  • Duplicates allowed: thislist = ["apple", "banana", "cherry", "apple", "cherry"]. [S1]
  • Mixed types: list1 = ["abc", 34, True, 40, "male"]. [S1]
  • Length: print(len(thislist)). [S1]
  • Type check: print(type(mylist)) # <class 'list'>. [S1]

⚖️ 모순 및 업데이트 (Contradictions & updates)

  • 딕셔너리 순서 보장은 버전에 따라 다름: Python 3.7+부터는 순서가 보장되지만, 3.6 이전에는 순서가 보장되지 않았다는 점이 명시됨. [S1]

🛠️ 적용 사례 (Applied in summary)

현재 발견된 실제 적용 사례가 없습니다 — 이후 Access/Change/Add/Remove/Loop/Sort/Copy/Join/Methods 챕터 전체의 기초가 되는 개론 문서다. [S1]

💻 코드 패턴 (Code patterns)

Basic list creation and type check (Python):

thislist = ["apple", "banana", "cherry"]
print(type(thislist))  # <class 'list'>

검증 상태 및 신뢰도

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

🔗 지식 그래프 (Knowledge Graph)

📚 출처 (Sources)

📝 변경 이력 (Change history)

  • 2026-07-04: Initial draft synthesized from the W3Schools "Python Lists" page (Astra wiki-curation, P-Reinforce v3.1 format).