rjust python

Solutions on MaxInterview for rjust python by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "rjust python"
Ana Paula
30 Nov 2018
1The rjust() method will right align the string, using a specified character
2(space is default) as the fill character. ljust() is same for left allignment.
3
4txt = "banana"
5txt.rjust(20,'x')       #txt.rjust(20,' ') is default.
6
7>>>"xxxxxxxxxxxxxxbanana"