Refer to the below example where the filename is ‘data.txt’
file=open('data.txt','r+')
last_date=(file.read())
print(last_date)
I am just mentioning the file name because the script and the file are in the same directory. Suppose they are in a different directory then you should mention the path and then the read the file.