i have a file with information in the pattern of:
.343423 1
.434322 1
.453434 1
.534342 1
Equal size each line and row in sorted order..I have a variable "a" with a value and need to get the row number which it closest to "a" comparing with the values in the 1st column..
Till now i was coping the 1st column element into list and then using bisect method i am getting the row_num...but as i need to perform this many times..this has become painfully slow as i need to copy some 4000 element to list everytime..
so now i am thinking of doing it with dict instead of datastructure as i would be faster...but i dont know whether we can use dict in bisect if possible how can we use for this case please suggest... if not possible are they any method for loading data into list faster then normal??? thanking you...