Created
January 17, 2018 09:05
-
-
Save karayok/330b5850760fcd0ffda1f2542e56eb41 to your computer and use it in GitHub Desktop.
delete \n / 改行を削除
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import fileinput | |
w = open('write.txt','a') | |
with fileinput.input(files=('read.txt')) as f: | |
for line in f: | |
w.write(line.replace('\n', '')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment