<gh_stars>0
print(f"We're going to erase {filename}.")
print("If you don't want that,hit CTRV-C (^C).")
print("If you dont't want that,hit RETURN.")
input("?")
print("Opening the file...")
target=open(filename,'w')
print("Truncating the file. Goodbye!")
target.truncate()
print("Now I'm going to ask you for three lines.")
line1=input("line 1:Mary had a little lamb ")
line2=input("line 2:Its fleece was white as snow")
line3=input("line 3:It was also tasty")
print("I'm going to write these to the file")
target.write(line1)
target.write("\n")
target.write(line2)
target.write("\n")
target.write(line3)
target.write("\n")
print("And finally,we close it.")
target.close()

print(f"We're going to erase {filename}.")
print("If you don't want that,hit CTRV-C (^C).")
print("If you dont't want that,hit RETURN.")
input("?")
print("Opening the file...")
target=open(filename,'w')
print("Truncating the file. Goodbye!")
target.truncate()
print("Now I'm going to ask you for three lines.")
line1=input("line 1:Mary had a little lamb ")
line2=input("line 2:Its fleece was white as snow")
line3=input("line 3:It was also tasty")
print("I'm going to write these to the file")
target.write(line1)
target.write("\n")
target.write(line2)
target.write("\n")
target.write(line3)
target.write("\n")
print("And finally,we close it.")
target.close()