I asked this question earlier but regarding another programming languages.
Let's say I have a couple roots, prefixes, and suffixes.
roots = ["car insurance", "auto insurance"]
prefix = ["cheap", "budget"]
suffix = ["quote", "quotes"]
Is there a simple function in Python which will allow me to construct all possible combinations of the three character vectors.
So I want a list or other data structures which returns the following list of all possible combinations of each string.
cheap car insurance quotes
cheap car insurance quotes
budget auto insurance quotes
budget insurance quotes
...