def __repr__ ( self ) : strings = [ ] for currItem in self : strings . append ( "%s" % currItem ) return "(%s)" % ( ", " . join ( strings ) )
how to print all objects in a string python
Return list - lookalike of representation string of objects
def __repr__(self):
        """Return list-lookalike of representation string of objects"""
        strings = []
        for currItem in self:
            strings.append("%s" % currItem)
        return "(%s)" % (", ".join(strings))