I\'m having a hard time trying to use .strip with the following line of code.
Thanks for the help.
f.write(re.split(\"Tech ID:|Name:|Account #:\",li
Starting file:
line 1 line 2 line 3 line 4
Code:
with open("filename.txt", "r") as f: lines = f.readlines() for line in lines: stripped = line.strip() print(stripped)
Output: