So I have a folder with two .txt Files A.txt and B.txt.
And I have a program that looks like this:
def main():
f = open("/Users/MyName/Desktop/MyPythonFolder/ProjectFolder/A.txt","r+")
print(f.read())
main()
When I run this program, IDLE crashes... but when I reboot IDLE and try to use B.txt it works perfectly fine. In addition, if I try to do print(len(f.read()))
or anything manipulating the file such as write, truncate, or even getting data from the file such as len(), split(), etc it works fine. I've identified this is because A.txt is filled with \x00 at the beginning. Does anyone know why/how these became present?