'Python's tqdm progress bar in IDLE

I have problems using the Python tqdm progress bar with IDLE. Instead of displaying a dynamic progress bar, as it happens in Jupyter,

enter image description here

IDLE prints new progress bars repeatedly on the same line.

enter image description here

Why does this happen? How could it be fixed?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source