Skip to content

Instantly share code, notes, and snippets.

View follyjohn's full-sized avatar

John FOLLY follyjohn

View GitHub Profile
@Kerruba
Kerruba / text-progress-bar-in-console.py
Last active December 27, 2024 18:10
Python #Python
# -*- coding: utf-8 -*-
# Print iterations progress
def print_progress(iteration, total, prefix='', suffix='', decimals=1, bar_length=100):
"""
Call in a loop to create terminal progress bar
@params:
iteration - Required : current iteration (Int)
total - Required : total iterations (Int)
prefix - Optional : prefix string (Str)