text_file = open("Output.txt", "w")

text_file.write("hello " * 50)

text_file.close()
#File manipulation
text_file = open("Output.txt", "w")

text_file.write("hello " * 50)

text_file.close()

Update Write-Txt-File.py