I have two lists:
frame = ["mercury", "noir", "silver", "white" ]
seat_colors = [
"coconut white", "yello", "black", "green", "cappuccino",
"orange", "chrome", "noir", "purple", "pink", "red",
"matte", "gray", "bermuda blue"
]
I'm trying to combine them to a single list where every frame is uniquely matched with every seat color.
I'd like to use zip() like so:
In [3]: zip(frame, colors)
Out[3]:
[('mercury', 'coconut white'),
('noir', 'yello'),
('silver', 'black'),
('white', 'green')]
But it truncates to the length of the smallest list.
I know I can iterate through the lists with:
In [5]:
for f in frame:
for c in colors:
print "%s, %s" %(f, c)
Out [5]:
mercury, coconut white
mercury, yello
mercury, black
mercury, green
mercury, cappuccino
mercury, orange
mercury, chrome
mercury, noir
mercury, purple
mercury, pink
mercury, red
mercury, matte
mercury, gray
mercury, bermuda blue
noir, coconut white
noir, yello
noir, black
noir, green
....
But I'd like the to be smarter about it and use the power of python's built in functions.