I am making a little program that will read and display text from a document. I have got a test file which looks like this:
12,12,12 12,31,12 1,5,3 ... >
12,12,12 12,31,12 1,5,3 ...
Thanks for @PePr excellent solution. In addition, you can try to print the .txt file with the built-in method String.join(data). For example:
String.join(data)
with open(filename) as f: data = f.readlines() print(''.join(data))