ljust()

All String methods

Add left justified filler strings of specified width
my_string.ljust(width, filler)
width : left justified string of width
filler : optional, string can be used to fill the width
my_str='Welcome to'
output=my_str.ljust(15,'*')
print(output) # Welcome to*****

my_str='Welcome to'
output=my_str.ljust(5,'*')
print(output) # Welcome to
All String methods rjust()


Subscribe to our YouTube Channel here


Subscribe

* indicates required
Subscribe to plus2net

    plus2net.com



    Post your comments , suggestion , error , requirements etc here





    Python Video Tutorials
    Python SQLite Video Tutorials
    Python MySQL Video Tutorials
    Python Tkinter Video Tutorials
    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2024 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer