How can I delete a /n
linebreak at the end of a String ?
I´m trying to read two strings from an .txt
file and want to format them with os.path.join()
method after I "cleared" the string.
Here you can see my try with dummy data:
content = ['Source=C:\\Users\\app\n', 'Target=C:\\Apache24\\htdocs']
for string in content:
print(string)
if string.endswith('\\\n'):
string = string[0:-2]
print(content)