def table(self, data, header=None):
        """Example::

            +----------+------------+
            | CityName | Population |
            +----------+------------+
            | Adelaide |  1158259   |
            +----------+------------+
            |  Darwin  |   120900   |
            +----------+------------+
        """
        if header:
            x = PrettyTable(header)
        else:
            x = PrettyTable()

        # construct ascii text table, split header and body
        for row in data:
            x.add_row(row)
        s = x.get_string(border=True)
        lines = s.split("\n")
        header_ = lines[:2]
        body = lines[2:]
        n_body = len(body)
        ruler = body[0]

        # add more rulers between each rows
        new_body = list()
        counter = 0
        for line in body:
            counter += 1
            new_body.append(line)
            if (2 <= counter) and (counter < (n_body - 1)):
                new_body.append(ruler)

        if header:
            return "\n".join(header_ + new_body)
        else:
            return "\n".join(new_body)
Example::

            +----------+------------+
            | CityName | Population |
            +----------+------------+
            | Adelaide |  1158259   |
            +----------+------------+
            |  Darwin  |   120900   |
            +----------+------------+