使用此代码:
data = open("data.py")
for i, line in enumerate(data):
if i == 7:
data.write("test")
我收到以下错误,我不知道如何解决它。
Traceback (most recent call last):
File "H:\py\Projects\osuGatcha\main.py", line 61, in <module>
data.write("test")
io.UnsupportedOperation: not writable