def __call__ ( self , _ ) : if self . iter % self . step == 0 : print ( self . fmt . format ( self . iter ) , * * self . kwargs ) self . iter += 1
python print current iteration
Print the current iteration .
def __call__(self, _):
        """Print the current iteration."""
        if self.iter % self.step == 0:
            print(self.fmt.format(self.iter), **self.kwargs)

        self.iter += 1