rjust()
Add right justified filler strings of specified width
my_string.rjust(width, filler)
width
: right justified string of width
filler
: (optional) string can be used to fill the width
my_str='Welcome to'
output=my_str.rjust(15,' ')
print(output, 'plus2net')
Output
Welcome to plus2net
my_str='Welcome to'
output=my_str.rjust(15,'#')
print(output, 'plus2net')
Output
#####Welcome to plus2net
« All String methods « ljust()
← Subscribe to our YouTube Channel here
This article is written by plus2net.com team.
https://www.plus2net.com
plus2net.com