I am very new to coding, I have a text file that contain data as
Test a value: 1134
Test b value: 2354
Test c value: 4827
And so on I am trying to write a script that will go through this file and increment values of certain tests by 1. For example I need my out put file to look like
Test a value: 1135
Test b value: 2355
Test c value: 4827
I need to do this 1000 time so it will take it forever to do it one by one. Appreciate any help you can provide.
I have tried reading the file and using for loop, not sure what I’m doing wrong, it just keep saying invalid.
f=open('Test.txt' ,mode='r')
h = f.readlines()
for line in h:
list = line[h].split(" ")
for i in line:
if(line.isdigit()):
temp = list[i] +1
list[i] = temp