1. Every outfit
Write code Easy ✓ CompletedWrite a function all_outfits(shirts, pants) that returns a list containing every (shirt, pants) pair, shirts first. Use itertools.product. The program then prints how many outfits there are for the lists in the starter code.
from itertools import product
def all_outfits(shirts, pants):
# return a list of (shirt, pants) tuples
pass
outfits = all_outfits(["white", "blue"], ["jeans", "shorts", "chinos"])
print(len(outfits))
from itertools import product
def all_outfits(shirts, pants):
return list(product(shirts, pants))
outfits = all_outfits(["white", "blue"], ["jeans", "shorts", "chinos"])
print(len(outfits))