f = open(r'作业一素材.txt',encoding = 'utf-8')
fo = f.read()
f.close()
temp = fo.strip().split('.')[36]
temp1 = temp.split(' ')[-1]
print('最后一个单词的长度是:',len(temp1))
txt2 = f2.read()
f2.close()
temp = txt2.split('。')[-2] #不考虑页脚
temp = sentence2.replace('\n','') #剔除除换行符
lens = len(sentence2) + 1 #补充被去掉的句号宽度
print('最后一个句子的长度为:',len2)