Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python write multiline string to file

x = """https://www.link1.com
            https://www.link2.com
            https://www.link3.com
            https://www.link4.com
            https://www.link5.com
            https://www.link6.com"""

    with open("text.txt","w+") as f:
        f.writelines(x)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #write #multiline #string #file
ADD COMMENT
Topic
Name
7+3 =