Last active
July 30, 2019 05:04
-
-
Save ChaitanyaBaweja/f7f3a328909dcc072a5480e8ae949605 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a= [1,2,3,4] | |
b = [10,11] | |
cart_prod = [] | |
for i in a: | |
for j in b: | |
cart_prod.append((i,j)) | |
print cart_prod | |
# Output: | |
# [(1, 10), (1, 11), (2, 10), (2, 11), (3, 10), (3, 11), (4, 10), (4, 11)] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment