Hi,
the below script works, but it adds a new line after it replaces
I cant understand why
it should just do a straight replace
Replace file
apple|pear
hello|Hi
the below script works, but it adds a new line after it replaces
I cant understand why
it should just do a straight replace
1 2 3 4 5 |
with open ( 'c:/Users/Dan/Desktop/Replace.txt' ) as f: for l in f: #s = l.split() s = l.split( '|' ) editor.replace(s[ 0 ], s[ 1 ]) |
apple|pear
hello|Hi
:)
Python newbie trying to learn the ropes