Blank lines in txt files in Python
问题 I almost finished my project, but there is still one little problem. I want to write sensor values in a txt file with Python. All is working fine but one thing : in the txt file, there're blank lines between each value. It's really annoying because I can't put the values in a spreadsheet. It looks like That: Sensor values: 2 4 6.32 1 etc.... When I want it that way : Sensor values: 1 2 3 5 8 etc... Here's the part of the code concerned : def write_data(): global file_stream now = datetime.now