KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have the code: import re sequence="aabbaa" rexp=re.compile("(aa|bb)+") rexp.findall(sequence) This returns ['aa'] If we have import re sequence="aabbaa" rexp=re.compile("(aa|cc)+") rexp.findall(sequence) we get ['aa','aa'] Why is there a difference and why (for the first) do we not get ['aa','bb','aa'] ? Thanks!
Tags (comma-separated)
Save Edits
Cancel