Python is a programming language that is widely used in the world. One of the reasons is that Python is a language that is easy to learn and can be used for many platforms.
After using Python for a long time, maybe we feel bored with the appearance of the output that is just like that. Now, in this post, I will give a few tips on how to add FontArt to the Python output display.
The method is quite easy, the first thing we have to do is install the PyFiglet library. PyFiglet converts ASCII text to ASCII art font.
pip install pyfiglet
After the installation is complete, then open the code editor and type the following code.
import pyfiglet
result = pyfiglet.figlet_format('Miloo Project')
print(result)
The result of the code is like this.
In addition, we can also change the displayed font, by adding a font parameter to the .figlet_format
function.
import pyfiglet
result = pyfiglet.figlet_format('Miloo Project', font='banner3-D')
print(result)
And the result will be like this.
You can get the type of font itself on this page.
You can find the complete code on GitHub.
Thatβs all for this post, if you have any questions, please write in the comments. Thank you.
Top comments (0)