code: def rejoin(string, separator_regexp=None, spaced=False):
      
      strings = split_and_strip(string)
      if separator_regexp is None:
          separator_regexp = _default_separator()
      joiner = spaced and '%s ' % separator_regexp or separator_regexp
      return joiner.join(strings)
docs: Split a string and then rejoin it
  
      Spaces are interspersed between items only if spaced is True
  
      >>> rejoin('fred, was, here  ')
      'fred,was,here'