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.