+ 1
How it works?!
How do work functions match.group() and match.groups() in module "re"?
3 Respostas
+ 4
Here if you mean that then if you write only group() it will return the whole pattern.
If you write group(0) it will return the first group if the pattern in this code I have given bc is the first group of the pattern.
If you write groups() then it will return the all group in a tuple.
Hope this helpful.
+ 5
I think there is no function called re.group() or re.groups()
do you mean the attribute of match?
This?
https://code.sololearn.com/c8ESZ985Oyug/?ref=app
+ 1
Yes, I mean the attribute of match. Sorry. But how it works?