i want to ask about tell() method. So, have code like this
op = open('data.txt', 'r')
pos = op.tell()
data = op.readline()
key = []
while data:
pos = op.tell()
data = op.readline()
key.append(pos)
and the result
key[:3]
[[87], [152], [240]]
i want my key value start from 0 since it's the first pointer position for the beginning of the sentence. but it starts from the starting pointer value for 2nd sentence. sorry, i'm new to python.
the data looks like this. it's containing few rows
Sanjeev Saxena#Parallel Integer Sorting and Simulation Amongst CRCW Models.
Hans Ulrich Simon#Pattern Matching in Trees and Nets.
Nathan Goodman#Oded Shmueli#NP-complete Problems Simplified on Tree Schemas.