user3279
0
Q:

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"
1

New to Communities?

Join the community