i want to try to open up a file, find the index of a particular string (S_N) then seek the position and write something underneath.
i am using the code...
C1 = open("Class 1.txt", "a")
pos = C1.find(S_N)
C1.seek(pos)
C1.write(correct)
and every time i use it, python throws up this error...
Traceback (most recent call last):
File "C:\Users\eddie\Documents\HOMEWORK!!!!\11c\Computing Science\controlled assessment help\task3\task 3 official.py", line 41, in <module>
pos = C1.find(S_N)
AttributeError: '_io.TextIOWrapper' object has no attribute 'find'
WHY DOES THIS NOT WORK????