Introducing ljust : String ljust : String PYTHON examples


PYTHON examples » String » String ljust »

 

Introducing ljust


Introducing ljust


s = 'buildConnectionString
print s.ljust(30)                                       

print s.ljust(20)                                        

# ljust pads the string with spaces to the given length. 

If the given length is smaller than the length of the string, ljust will simply 
return the string unchanged. It never truncates the string.
           
       



    Related Scripts with Example Source Code in same category :

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON examples

 Navioo String
» String ljust