I was playing around in the interpreter and the file.write() method was acting weird, I'm hoping someone can explain it.
>>> file.seek(0)
>>> file.tell()
0
>>> file.readline()
'The Project Gutenberg EBook of The Adventures of Sherlock Holmes\n'
>>> file.tell()
65
>>> file.realine()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'file' object has no attribute 'realine'
>>> file.readline()
'by Sir Arthur Conan Doyle\n'
>>> file.tell()
91
>>> file.write("line\n")
>>> file.tell()
4101
>>>
Why did file.write("line\n") make it jump to 4101?
file is a copy of this: http://norvig.com/big.txt opened in r+ mode