I am referring to the documentation of the re.findall
function:
What is the meaning of "Empty matches are included in the result."?
This happen when you use groups that matches empty string , example:
print(re.findall(r'(\w)(\d?)(\w)', "bc"))
OUPUT:
[('b', '', 'c')]
Here group (\d?)
matches ''
and is included in the result.