Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Python - Create a text border with dynamic size

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  |
+-----------------------+
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Python #Create #text #border #dynamic #size
ADD COMMENT
Topic
Name
4+1 =