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"
Are there any code examples left?
New code examples in category Python