xpxu
f1=file("hello.txt")
count=0
s=f1.read()
li=re.findall("hello",s)
if len(li)>0:
    count=count+li.count("hello")
print str(count)
f1.close()

 

分类:

技术点:

相关文章:

  • 2022-01-08
  • 2022-01-04
  • 2021-11-29
  • 2018-09-05
  • 2021-11-23
  • 2021-04-04
  • 2022-01-07
  • 2021-12-05
猜你喜欢
  • 2021-11-23
  • 2021-05-19
  • 2021-11-29
  • 2021-11-23
  • 2021-10-19
  • 2021-12-28
  • 2021-07-03
相关资源
相似解决方案