I am given a text file named tr4_1.txt, the file content is below:
1110000000001111
1110100000000000
1000001111111111
0111011101010101
I would like to ask how could I edit my code below so that the output file can combine all lines into one?
1110000000001111111010000000000010000011111111110111011101010101
Then I would like to ask, say i have 10 such files, how could I read all the files automatically, do the similar things on each file then combine them into one file? Thanks !! Is that I should use a for loop?