欧阳子轩的作业一

代码


  import re

  h = open("C:\\Users\\13644\\Desktop\\作业一素材.txt",mode='r', encoding='utf-8')
  a = h.read()
  b = a.splitlines()
  target = b[-3]
  c = re.findall(r'\s(\w*).$', target)
  x=c[0]
  len(x)

结果

结果截图

解释