
Hier der Code: http://paste.pocoo.org/show/108665/
Code: Alles auswählen
def partition_all(string, separator):
result = list()
while True:
head, separator, string = string.partition(separator)
if not separator:
break
result.append((head, separator, string))
return result