Answers for "python write line break"

0

python write line break

new_line = "This new line will be added.\n"

with open("sample.txt", "a") as a_file:
  a_file.write("\n")
  a_file.write(new_line)
Posted by: Guest on August-19-2020
3

line break in python code

a = '1' + '2' + '3' + \
    '4' + '5'

#preferred by style guide
a = ('1' + '2' + '3' +
    '4' + '5')
Posted by: Guest on April-09-2020

Python Answers by Framework

Browse Popular Code Answers by Language