anonymous
  • anonymous
How can i print out a file on three seperate lines. I currently have it as: target.write(line1\n + line2\n + line3\n) this is working. Ive tried different variations with no success. Ive looked at docs.python and didnt understand much. I would like the answer but also a place to reference this question.
MIT 6.00 Intro Computer Science (OCW)
chestercat
  • chestercat
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Get this expert

answer on brainly

SEE EXPERT ANSWER

Get your free account and access expert answers to this
and thousands of other questions

anonymous
  • anonymous
you can try: target.write("%s \n %s \n %s \n" % (line1,line2,line3)) if you have the string class imported: import string target.write("{0} \n {1} \n {2}\n".format(line1,line2,line3))

Looking for something else?

Not the answer you are looking for? Search for more explanations.