import re
matches=re.finditer('(?=ATAT)', 'GATATATGCATATACTT')
for match in matches:
    print((match.start()+1,match.start()+len('ATAT')))

 在匹配模式中?可以查找重叠区域。

###上述的结果为

(2,5)

(4,7)

(10,13)

 

###假如不用?

输出结果为:

(2,5)

(10,13)

从上述结果可以看出,重叠的区域无法查找出来,我也不晓得为啥????

 

相关文章:

  • 2022-12-23
  • 2021-10-19
  • 2022-12-23
  • 2022-12-23
  • 2021-08-25
  • 2022-12-23
  • 2022-12-23
  • 2021-10-06
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-21
  • 2021-09-10
  • 2021-12-17
  • 2021-12-05
  • 2022-12-23
相关资源
相似解决方案