I have a piece of code where I fill variables with data
and would like to add the first column of each row into the variable:
So each variable in a row should contain: %VAR_ + 'value of column' + headerRow[i] + %
Now it looks like this which makes variables only unique within a row.
result =  for line in lines: i = 0 for cell in row: tmp = ('%VAR_' + headerRow[i] + '%') line = line.replace(tmp, cell) # string.replace(old, new) i = i + 1 result.append(line) return result