Jan-14-2020, 08:26 AM
(Jan-14-2020, 08:14 AM)buran Wrote: not tested but
with open('Grid_cell.txt') as f: grid_cells = [line.strip() for line in f] with open('original_soil_param.txt') as f, open('subset_soil_param.txt', "w") as sub_f: for line in f: cell_id = line.split(' ')[1] if cell_id in grid_cells: sub_f.write(line)
Buran, man it worked, thank you so much.