code: def strip_line(line, sep=os.linesep):
      
  
      try:
          return line.strip(sep)
      except TypeError:
          return line.decode('utf-8').strip(sep)
docs: Removes occurrence of character (sep) from a line of text