Source Code:
(back to article)
fruits = ['apple', 'banana', 'cherry'] colors = ['red', 'green', 'blue'] fruit_colors = [(fruit, color) for fruit in fruits for color in colors] print(fruit_colors)
Result:
Report an issue