def ratio_and_percentage ( current , total , time_remaining ) : return "{} / {} ({}% completed)" . format ( current , total , int ( current / total * 100 ) )
smart way to do percentage python
Returns the progress ratio and percentage .
def ratio_and_percentage(current, total, time_remaining):
    """Returns the progress ratio and percentage."""
    return "{} / {} ({}% completed)".format(current, total, int(current / total * 100))