I have some text like this:
<Row 1 Having A Text>
<Row 2 Having B Text>
<Row 3 Having C Text>
I am trying to remove entirely and shift up.
I have been trying to use this:
for line in fileinput.input(new_name, inplace=True):
print (re.sub(r'<Row 2.*[\r\n]*', '', line.strip()))
However, this just results in the following:
<Row 1 Having A Text>
<Row 3 Having C Text>
And Row 3 does not move up. What am I missing here?