I have a very large text file.
In that file, using python, I want to change line 3333 from AABB
to AA_BB
.
Since I know exactly which line I want to change, it seems pointless to open the entire file with file.readlines()
as suggested here, here, and here.
I there an efficient way to do this? Something like sed -i -e '3333s/AABB/AA_BB/'
?