code: def truncate(string, width):
      
      if len(string) > width:
          return string[:width-3] + '...'
      else:
          return string.ljust(width)
docs: Truncates/pads the string to be the the specified length,
      including ellipsis dots if truncation occurs.