file content replacement but ambiguous data

3 views
Skip to first unread message

sagar ninave

unread,
Jun 23, 2019, 12:29:00 PM6/23/19
to Python Belgian User Group - pyBug
i am doing file content replacement using file handling when length of old content is less and length of new content is more then it new content is replacing correctly but old content update with new content again i am updating file content which is new  content in file right now with old content so now old content length is small updated new content of file so that old content is replacing but in last it should blank spaces should remaining blank but it is happening some weird it is repeating last letter in blank space to complete len of string
pract.txt
replacefilecontent.py

Jeroen Dierckx

unread,
Jun 24, 2019, 7:43:14 AM6/24/19
to python-belgi...@googlegroups.com
Hi,
Please use standard English (especially punctuation).
Your question is unreadable.
Thanks
Jeroen

On Sun, 23 Jun 2019 at 18:29, sagar ninave <sagar...@gmail.com> wrote:
>
> i am doing file content replacement using file handling when length of old content is less and length of new content is more then it new content is replacing correctly but old content update with new content again i am updating file content which is new content in file right now with old content so now old content length is small updated new content of file so that old content is replacing but in last it should blank spaces should remaining blank but it is happening some weird it is repeating last letter in blank space to complete len of string
>
> --
> You received this message because you are subscribed to the Google Groups "Python Belgian User Group - pyBug" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to python-belgian-use...@googlegroups.com.
> To post to this group, send email to python-belgi...@googlegroups.com.
> Visit this group at https://groups.google.com/group/python-belgian-user-group.
> To view this discussion on the web visit https://groups.google.com/d/msgid/python-belgian-user-group/247f4e5d-966e-462a-b997-d558b02d84ca%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages