Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
Tags
- MongoDB
- devops
- Python
- SCALA APP
- Transit Gateway
- ubuntu
- debug_toolbar
- list
- json
- django-debug-toolbar
- ai assistant
- mcponaws
- Amazon
- git
- debug toolbar
- django
- Eclipse
- Spark
- 툴바안뜸
- VPC
- pyspark
- AI
- coding with ai
- AWS
- nosql
- AWSKRUG
- amazon q
- tgw
Archives
- Today
- Total
STACKBASE
[Python] Iterable 본문
반응형
1. 이터러블, 이터러블 객체
- 문자열, 리스트, 튜플, 집합, 딕셔너리 등의 자료형 객체는 Iterable(반복 가능)하다.
- 원소를 하나씩 꺼내는 구조
- iter(), __next__, next() 를 이용하여 원소를 순차적으로 꺼낼 수 있다.
- 꺼낼 원소가 존재하지 않으면 StopIteration Error를 발생시킨다.
반응형
'프로그래밍 > Python' 카테고리의 다른 글
[Python] 모듈과 __name__ == '__main__' 의미 (0) | 2022.02.23 |
---|---|
[Python] 함수 어노테이션(annotation) (0) | 2022.02.23 |
[Python] map, filter 함수 (0) | 2021.11.28 |
[Python] lambda function (0) | 2021.11.28 |
[Python] 위치/키워드 가변 매개변수 (0) | 2021.11.28 |