Oh! Sorry I didn't get that earlier. 😛
On Sat, 18 Apr, 2020, 9:10 pm MRAB, wrote:
> On 2020-04-18 08:59, Souvik Dutta wrote:
> > Okay so I was not able to say properly. You are indeed doing the same
> thing
> > that you were doing i.e. writting the modified data just, that now you
> > don't need
On 2020-04-18 08:59, Souvik Dutta wrote:
Okay so I was not able to say properly. You are indeed doing the same thing
that you were doing i.e. writting the modified data just, that now you
don't need to close you if file before doing any writting stuff. That is
there is a one line deduction from t
Okay so I was not able to say properly. You are indeed doing the same thing
that you were doing i.e. writting the modified data just, that now you
don't need to close you if file before doing any writting stuff. That is
there is a one line deduction from the whole code.
Souvik flutter dev
On Sat,
Souvik Dutta wrote:
> You can actually read and write in a file simultaneously. Just replace "r"
> with "w+" if the file has not been previously made or use "r+" is the file
> has already been made.
Good advice for those who like to butcher their data ;)
Seriously, writing modified data into a n
You can actually read and write in a file simultaneously. Just replace "r"
with "w+" if the file has not been previously made or use "r+" is the file
has already been made.
Souvik flutter dev
On Sat, Apr 18, 2020, 4:45 AM wrote:
> Hi;
>
> I am reading a Python file and find an specific line, re
On 18/04/20 11:10 AM, hnasr9...@gmail.com wrote:
I am reading a Python file and find an specific line, replace a text and then
write back to the file.
When I check back the file, I am getting indent error.
How to fix this issue.
Please make it easier for us (volunteers giving-up our free ti
On 18/04/20 11:10 am, hnasr9...@gmail.com wrote:
Hi;
I am reading a Python file and find an specific line, replace a text and then
write back to the file.
When I check back the file, I am getting indent error.
It looks like your script is stripping out all the indentation when
it writes the
Hi;
I am reading a Python file and find an specific line, replace a text and then
write back to the file.
When I check back the file, I am getting indent error.
How to fix this issue.
reading_file = open("myfile.py", "r")
new_file_content = ""
for line in reading_file: