View Single Post
Old 12-19-2016, 05:48 AM   #2
wdecoster
Member
 
Location: Antwerp, Belgium

Join Date: Oct 2015
Posts: 97
Default

An easy solution would be to loop over the file and have a variable 'previous':

!Untested sample code generated by tired coffee deprived me:

Code:
previous = 0
for line in file:
    now = line.split('\t')[0]
    if  now != previous + 10000:
        for n in range(previous + 10000, now, step=10000):
            print(n + "\t0")
    print(line)
    previous = now
wdecoster is offline   Reply With Quote