You can download this code by clicking the button below.
This code is now available for download.
Generate an ASCII table with the given text and filled with specified character.
Technology Stack : String manipulation
Code Type : Text formatting
Code Difficulty : Intermediate
def ascii_table(text, char='*'):
def get_row(text, char):
return char * (len(text) + 2)
print(get_row(text, char))
print(f"{char}{text}{char}")
print(get_row(text, char))