Estou tendo dificuldade em tentar usar .strip com a seguinte linha de código.
Obrigado pela ajuda.
f.write(re.split("Tech ID:|Name:|Account #:",line)[-1])
strip. Você quer: f.write(str(re.split("Tech ID:|Name:|Account #:",line)[-1]).strip()).
re.split(r"\s*(?:Tech ID:|Name:|Account #:)\s*etc.