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)