Answers for "rjust python"

3

rjust python

The rjust() method will right align the string, using a specified character
(space is default) as the fill character. ljust() is same for left allignment.

txt = "banana"
txt.rjust(20,'x')       #txt.rjust(20,' ') is default.

>>>"xxxxxxxxxxxxxxbanana"
Posted by: Guest on July-10-2020

Python Answers by Framework

Browse Popular Code Answers by Language