In this video, I will show you some code examples of how you can justify (align) text with Python using the ljust, rjust and center methods.
I will also demonstrate how you can also fill in spaces both before and after the text using each of these method, culminating in a simple DOS-style welcome screen.
Link to code on GitHub: https://github.com/York13Pud/youtube-code/tree/main/python/justify-text
Link to blog post: https://dev.to/dev_neil_a/python-how-to-prepending-and-appending-text-to-fill-space-24a4
Timestamps:
00:00 Introduction
00:26 Code Examples
#python #coding #howto #tutorial #programming