# replace with your code here f = open('D:\python\作业一素材.txt',encoding='utf-8') txt = f.read() f.close() line1 = txt.splitlines() line2 = line1[-3] word = line2[-7:-1] length = len(word) print(length)
如果所写代码复杂,且没有良好的注释,那么请在这里补充解释。