my .txt
file is below
Pyhton is open source language
its a freeware
it has lot of in built modules
python is easiest
what should I do to insert two lines below its freeware
lines and move the remaining data below that inserted lines, as shown below,
Pyhton is open source language
its a freeware
Hi
my name is shubham
it has lot of in bult modules
python is easiest
I have tried following code but its appending the new lines at last in file
file_to_write = r"file.txt"
with open(file_to_write,'a') as fw:
fw.write('Hi\n')
fw.write('my name is shubham')