일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 자바 기초
- data communication
- Python challenge
- 백준 러스트
- 러스트 프로그래밍 공식 가이드
- 데이터 통신
- Rust
- 파이썬 챌린지
- 백준
- 파이썬 알고리즘
- Operating System
- 오라클
- OS
- 러스트 예제
- C
- 러스트
- 알고리즘
- 자바
- Reversing
- 우분투
- Python
- 파이썬
- ubuntu
- 오라클DB
- 파이썬 첼린지
- java
- 운영체제
- 데이터베이스
- Database
- 자바 개념
Archives
- Today
- Total
목록파이썬 반복자 (1)
IT’s Portfolio
[Python] Iterator
💻 Iterator 🤔 What is Iterator? 반복자: 순서대로 다음 값을 반환할 수 있는 객체를 의미 자체 내장된 next 매직 메서드 Iterator 객체 구현 class Class_of_Iteration: def __init__(self, start_num, stop_num): self.pointer = start_num self.max = stop_num def __iter__(self): return self def __next__(self): if self.pointer > self.max: raise StopIteration else: self.pointer+=1 return self.pointer-1 A = Class_of_Iteration(1, 3) print(type(A)) p..
Development Study/Python
2022. 11. 28. 15:22