길/Python

itertools

7he8oy 2021. 2. 12. 16:53

itertools는 파이썬의 standard library라고 한다.

추후 몇 가지 이용할 수 있는 것을 적어놓아야겠다.

 

docs.python.org/ko/3/library/itertools.html

 

itertools — 효율적인 루핑을 위한 이터레이터를 만드는 함수 — Python 3.9.1 문서

 

docs.python.org

count(n) : n부터 무한으로 숫자를 늘려간다.

 

cycle(arg) : 인자 안에 들어온 것 안에서 반복

repeat(element[,n]) : element를 n만큼, 혹은 무한정 반복

 

' > Python' 카테고리의 다른 글

subclass에서 super()는 superclass의 method를 읽는다.  (0) 2021.02.12
Class의 모든 method는 self를 인자로 받는다.  (0) 2021.02.12
decorator  (0) 2021.02.12
Generators  (0) 2021.02.12
List Functions  (0) 2021.02.11