Here’s a small Python script to print word art using ASCII characters
from pyfiglet import Figlet
# Initialize Figlet with a font
fig = Figlet(font='slant')
# Input the word
text = input("Enter a word: ")
# Generate and print ASCII art
print(fig.renderText(text))
This script uses the pyfiglet
library to generate stylish ASCII text. You can install it using
pip install pyfiglet
Here’s an example of what the output might look like if you enter "HELLO"
_ _ _ _
| | | | | | |
| |__| | ___| | | ___
| __ |/ _ \ | |/ _ \
| | | | __/ | | (_) |
|_| |_|\___|_|_|\___/
This is generated using the slant
font in pyfiglet
. You can change the font style by modifying
fig = Figlet(font='slant') # Try 'block', 'standard', etc.