When executing the following code, after the second read, file gets filled with zero until being 4096 bytes large. I can't figure out why :
f = open("file.txt", "w+")
f.read()
# gives ''
f.write("Hello")
f.read()
# filled with \x00,\x00
f.close()
# file is 4096 bytes large...