Python Programming - Reading and Writing Files - Discussion
Discussion Forum : Reading and Writing Files - General Questions (Q.No. 88)
88.
How can you write a list of strings to a text file named "output.txt" in Python, with each string on a new line?
Answer: Option
Explanation:
Using
"\n".join(strings)
to join the strings with newline characters.
Discussion:
Be the first person to comment on this question !
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers