Is re.findall guaranteed to be "in order?"
fredrik at pythonware.com
Wed Jul 16 09:27:10 CEST 2008
Joshua Kugler wrote:
> Experimenting has shown me that re.findall() will return a list with the
> matches in the order it found them.
"in the order it found them" doesn't really say much, does it? ;-)
"findall" and "finditer" both scans the string from left to right, and
will return matches in that order.
(the documentation is a bit vague, so if you have the time, please add a
request for clarification to the bug tracker)
More information about the Python-list