Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __str__(self):
""" Returns a readable representation of a table. """
table_list = [PORTFOLIO_HEADERS]
for row in self.data:
table_list.append([row[col] or '' for col in PORTFOLIO_HEADERS])
return create_table_string(table_list)
def __str__(self):
""" Returns a readable representation of a table. """
table_list = [self.headers]
for row in self.data:
table_list.append([row[col] or '' for col in self.headers])
return create_table_string(table_list)