[ad_1]
You are removing the newline characters “\n” from each line in the file with the statement:-
line=line.strip()
Just remove it and it should work correctly.
[ad_2]
solved Python output on a separate lines
[ad_1]
You are removing the newline characters “\n” from each line in the file with the statement:-
line=line.strip()
Just remove it and it should work correctly.
[ad_2]
solved Python output on a separate lines