code: def format(self):
          ''' Format table to print out
          '''
          self.max_lengths = []
          for row in self.rows:
              if len(self.max_lengths) < len(row):
                  self.max_lengths += [0] * (len(row) - len(self.max_lengths))
              for idx, val in enumerate(row):
                  len_cell = len(str(val)) if val else 0
                  if self.max_lengths[idx] < len_cell:
                      self.max_lengths[idx] = len_cell
          return self.max_lengthf format(self):
          ''' Format table to print out
          '''
          self.max_lengths = []
          for row in self.rows:
              if len(self.max_lengths) < len(row):
                  self.max_lengths += [0] * (len(row) - len(self.max_lengths))
              for idx, val in enumerate(row):
                  len_cell = len(str(val)) if val else 0
                  if self.max_lengths[idx] < len_cell:
                      self.max_lengths[idx] = len_cell
          return self.max_lengths
docs: Format table to print out