# f = open('作业一素材.txt','r',encoding='utf-8')
txt = f.read()
f.close()
end = txt.find('\n顺丰控股股份有限公司')
txt_target = txt[:end]
lines = txt_target.split('\n')
last_line = lines[-1]
words = last_line.split(' ')
last_word = words[-1]
last_word = list(last_word)
last_word = last_word[0:-1]
len(last_word)
如果所写代码复杂,且没有良好的注释,那么请在这里补充解释。