Python String ljust() MethodLast Updated : 31 Dec 2025 Python ljust() method left justify the string and fill the remaining spaces with fillchars. This method returns a new string justified left and filled with fillchars. Syntax of Python String Ijust() MethodIt has the following syntax: Parameters
ReturnIt returns a left justified string. Different Examples for Python String Ijust() MethodLet's see some examples of ljust() method to understand it's functionalities. Example 1Let us take an example to demonstrate the ljust() method in Python. Output:
Example 2Let us take an example to demonstrate the ljust() method in Python. Output:
Next TopicPython Strings |
We request you to subscribe our newsletter for upcoming updates.

We deliver comprehensive tutorials, interview question-answers, MCQs, study materials on leading programming languages and web technologies like Data Science, MEAN/MERN full stack development, Python, Java, C++, C, HTML, React, Angular, PHP and much more to support your learning and career growth.
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India