arr = [(line.rstrip('\n').split(';')) for line in open('C:/Config_Changer.csv')]
for i, line in enumerate(fileinput.input('C:/1.cfg', inplace = 1)):
for f,t in arr:
if 'description' not in line:
line = line.replace(f, t)
ok my problem is my config changer file is like 1/1/1;1/1/2 1/1/2:1/1/4
when I run the script it first change 1/1/1 to 1/1/2 then to 1/1/4 but I don't want that; I want that it changes 1/1/1 to 1/1/2 and 1/1/2 to 1/1/4 so when its replacing the values from array;I want that it should read from the first buffered file not the last changed file :) How can I do that ?