f=open(r'C:\Users\Administrator\Desktop\数据获取\作业一素材.txt',encoding='utf-8')
txt=f.read()
lines = txt.split('\n')#将文本以换行符分割
line = lines[-3]#不考虑页脚内容,文本中最后一个单词的长度在倒数第三行
words = line.split(" ")#将该行以空格分割
word = words[-1]#找到最后一个单词
last_word = word[0:-1]#去掉标点符号
print(last_word)
print(len(last_word))