1f = open("Myfile.txt", "r")
2print(f.read()) #this is it if your using visual studio code.
3
4 # it may work on other things but try it.
5
6 #here is the other bit of code for the other file
7
8
9
10#-------------------------------------------------------------------------
11 #this will overwrite anything in the text file!!!
12 when you run the code
13file1 = open("MyFile.txt","w+") #this is the code to add text to the file
14
15file1.readline()
16
17file1.write("boy") #where you type in to add text to fiel
18
19
20file1.close() # to close the file
21
1fin = open("NAME.txt", 'r')
2body = fin.read().split("\n")
3line = fin.readline().strip()