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
- DB
- sqlite
- ps
- Git
- CV
- python
- CSS
- PyTorch
- html
- GAN
- ML
- API
- SOLID
- frontend
- react
- Three
- nodejs
- figma
- UI
- review
- vscode
- ts
- js
- DM
- Linux
- PRISMA
- mongo
- Express
- postgresql
- C++
Archives
- Today
- Total
아카이브
[Python] Library | 03. tqdm 본문
tqdm 라이브러리는 반복 루프를 실행시킬 때 얼마까지 진행 되었는지를 나타내기 위해 터미널에 로딩바와 남은 시간을 표시할 수 있게 해줍니다.
tqdm을 사용할 때는 아래와 같이 반복자(iterator)를 인수로 받아 객체를 생성하면 됩니다. 생성된 tqdm 객체도 반복자처럼 사용할 수 있습니다.
import time
import tqdm
iterator = tqdm.tqdm(range(5))
for i in iterator:
print(i) # 0, 1, 2, 3, 4
time.sleep(1)
728x90
'Language > Python' 카테고리의 다른 글
[Python] requirements.txt 파일 작성하기 (0) | 2025.02.16 |
---|---|
[Python] Library | 05. Pydantic (0) | 2025.02.16 |
[Python] Library | 04. selenium (0) | 2024.01.28 |
[Python] Library | 02. lmdb (0) | 2023.06.03 |
[Python] Library | 01. functools (0) | 2023.05.12 |
Comments