title: Binary search over a huge file with unknown line length
body: <p>I'm working with huge data CSV file. Each file contains milions of record , each record has a key. The records are sorted by thier key. I dont want to go over the whole file when searching for certian data.
  I've seen this solution : <a href="https://stackoverflow.com/questions/744256/reading-huge-file-in-python">Reading Huge File in Python</a></p>
  
  <p>But it suggests that you use the same length of lines on the file - which is not supported in my case.</p>
  
  <p>I thought about adding a padding to each line and then keeping a fixed line length , but I'd like to know if there is a better way to do it.</p>
  
  <p>I'm working with python</p>