from pprint import PrettyPrinter


class MyPrettyPrinter(PrettyPrinter):

    def format(self, object, context, maxlevels, level):
        if isinstance(object, float):
            pass
Control a print format when printing a list in Python