How to read a file without newlines?
How to read a file without newlines? Question: In Python, calling e.g. temp = open(filename,’r’).readlines() results in a list in which each element is a line from the file. However, these strings have a newline character at the end, which I don’t want. How can I get the data without the newlines? Asked By: Yotam …