# 输出进度条的图形

```python
# pip install tqdm
from time import sleep
from tqdm import tqdm
# 这里同样的，tqdm就是这个进度条最常用的一个方法
# 里面存一个可迭代对象
for i in tqdm(range(1, 500)):
  # 模拟你的任务
  sleep(0.01)
sleep(0.5)
```

![](/files/XHOCrkielLwWSQJFuv1e)

```python
# pip install alive-progress
from alive_progress import alive_bar
import time
 
# retrieve your set of items
items = range(100)       
 
# declare your expected total   
with alive_bar(len(items)) as bar:  
  # iterate as usual
  for item in items:        
    # process each item
    bar()
    time.sleep(0.1)img
```

![](/files/EgjwZqd9nHNCuzRHhkkj)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://close.gitbook.io/yun-wei-bi-ji/python/python-xiao-ji-qiao/shu-chu-jin-du-tiao-de-tu-xing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
