I have created a script with unique combinations, but I'm stuck on how to go about writing it into a csv file. Right now it's just printing out in my command line and hard to get a good grasp of the data.
My code:
from itertools import combinations, product
crust = ['Thin Crust', 'Hand Tossed']
topping = ['Bacon', 'Pepperoni', 'Steak']
sauce = ['Tomato', 'BBQ', 'Ranch']
topping_combs = combinations(topping, r=2)
sauce_combs = combinations(sauce, r=2)
topping_combs = list(topping_combs)
sauce_combs = list(sauce_combs)
prod = product(crust, topping_combs, sauce_combs)
for c, t, s in prod:
print(c, *t, *s, sep=', ')