Recently, I started to create a program that I could write and record work that I had to do, in order to maintain control of the work that I had done, and work that still needs to be completed. However, I have one large issue at the moment, and it is that the program can read the data that has been sent to the text file where everything is recorded, but cannot use the '.split'function.
The code for this part of the program is the following:
def dialog3():
document = open('homework.txt','r+')
doc2 = document.readlines()
print(doc2)
doc3 = doc2.split(['\n'])
btn.configure(state=DISABLED)
btn2.configure(state=DISABLED)
btn3.configure(state=DISABLED)
Along with the following error message:
doc3 = doc2.split(['\n'])
AttributeError: 'list' object has no attribute 'split'