import re
def split_and_keep_multi_delimiters(s, delimiters):
# Create a regex pattern by joining the delimiters with a pipe '|' for 'OR',
# and wrapping each with parentheses to create capture groups.
pattern = "|".join(f"({re.escape(d)})" for d in delimiters)
# Use re.split() with the created pattern
result = re.split(pattern, s)
# re.split() may produce empty strings due to how the split works
return [item for item in result if item]
s = "aa==bbb---cccc++++ddddd"
delimiters = ["==", "---", "++++"]
split_list = split_and_keep_multi_delimiters(s, delimiters)
print(split_list)
'''
run:
['aa', '==', 'bbb', '---', 'cccc', '++++', 'ddddd']
'''