每个字符之前都会 match,包含字串结尾 $ 前面的位置Empty matches are included in the result unless theresult unless they touch the beginning of anothermatch.
https://goo.gl/qcxoYj有兴趣也可以玩一下 re.findall(r'o*?', s1, re.DEBUG)抓到的空白为标问号的位置 '?a?b?c?' 这样应该比较清楚就像 re.findall(r'o*?', '') 回传的不是 empty list更正 空字串 不是空白 XD