from tabulate import tabulate
table_header = ['Options', 'Explain','Impact']
table_data = []
for i in self.add_list:
table_data.append( (somethingtoprint) )
pfile.write(tabulate(table_data, headers=table_header, tablefmt='grid'))
Here , when somethingtoprint is very long string, the output format is corrupted. Is there any way to use tabulate more pretty?
Updated: I mean the table content is so long that it will exceed the screen width, then the display can be messed up.
like
id name
123 "zzzzzzzzzzzzzzzzadsas daaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
Thank you