Python - Buat perbatasan teks dengan ukuran dinamis
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