how to edit or update the values of records text file in python using seek and tell function

26 Views Asked by At

In class 12 file handling there is a method of updating binary using seek and tell function but I need it for text files

I tried some methods but ended up in error can anyone help me with this.

def readFile():
    f=open(r'D:\Sri Sayee\project\gggg.txt','r+')
    for i in f:
        s=i.split()
        if s[0].lower()=='arvind':
           ......
            

I got stuck after this. think this is wrong anyone can help me with this.

0

There are 0 best solutions below