I like to create strings in the following manner: The string has a prefix, a main part and a suffix, all separated by a delimiter. The prefixes, suffixes and delimiters are stored in lists
ListOfPrefixes=['pre1','pre2']
ListOfSuffixes=['suf1','suf2','suf3']
ListOfDelims=['-','_','']
MainPart = 'main'
Now I like to create strings using combinations of the list items like
pre1-main-suf1
pre2-main-suf1
pre1-main-suf2
...
pre2_main_suf2
...
pre1mainsuf3
I tried to use itertools to get combinations of the list items, but I didn't find the correct code to get my combinatons.
Is there an easy way or do I have to combine several itertools.combinations? Or do I have to loop over all lists?