Python - Erstellen Sie einen Textrand mit dynamischer Größe
from tabulate import tabulate
text = """
some words that
could be dynamic but
are currently static
"""
table = [[text]]
output = tabulate(table, tablefmt='grid')
print(output)
# Output:
+-----------------------+
| some words that |
| could be dynamic but |
| are currently static |
+-----------------------+
corsair2014