my question is how do I scan "my_list" for "comp" and change the associated time value from 200 to "t" only if 200 is less than t?
t = 3000
comp = 'C1'
my_list = [[200, 'C1'],[4000, 'C2']]
Output:
my_list = [[3000, 'C1'],[4000, 'C2']]
The opposite could be done with this scenario as the list shouldn't change as "t" is less than "5000":
t = 3000
comp = 'C1'
my_list = [[5000, 'C1'],[4000, 'C2']]