Antoine> By the way, re.partition() is *really* useful compared to Antoine> re.split() because with the latter you don't which string Antoine> precisely matched the pattern (it isn't an issue with Antoine> str.split() since matching is exact). Just group your re: >>> import re >>> >>> re.split("ab", "abracadabra") ['', 'racad', 'ra'] >>> re.split("(ab)", "abracadabra") ['', 'ab', 'racad', 'ab', 'ra'] and you get it in the return value. In fact, re.split with a grouped re is very much like Raymond's str.partition method without the guarantee of returning a three-element list. Skip
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4