I have a text file with the following content;
variable_1 = 1;
variable_2 = 2;
variable_3 = 3;
variable_4 = 4;
Using python, I would like to modify variable_2 to 22 and variable_3 to 33 such that the text file will look like this;
variable_1 = 1;
variable_2 = 22;
variable_3 = 33;
variable_4 = 4;
How can this be done using python v3.8?