How would I create a python function that outputs all combinations of a defined set of variables? : <p>Here is what I am trying to do but not exactly sure how to make this work. I have 3 sets of variables and I want to output all combinations of those 3 sets and output in a format that maintains the order of the variables like this:</p>

<pre><code>list_of_vars = [var1, var2, var3]
</code></pre>

<p>The variables would look something like this:</p>

<pre><code>var1 = [1, 2, 3]
var2 = ["foo", "bar", "foo2"]
var3 = ["a", "b", "c"]
</code></pre>

<p>The final output should look like this.</p>

<pre><code>final_list_of_vars = [[1, "foo", a], [1, "bar", a], .......]
</code></pre>
