Ask your own question, for FREE!
Computer Science 20 Online
OpenStudy (anonymous):

Hi I have a question on my Python code. I want to put a line break next to a print statement, which prints a variable. outfile.write('Your mood today is\n') outfile.write(mood) (I want a line break just here) Thanks for your help!

OpenStudy (anonymous):

`outfile.write('\n')`

OpenStudy (rsmith6559):

Oh, that it would be so simple! Windows: outfile.write( "\r\n" ) Unix & Apple command line: outfile.write( "\n" ) Some Apple GUI programs: outfile.write( '\r' )

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!