Forked from nikojankovic/generate-cartesian-product.py
Created
July 28, 2020 14:53
-
-
Save riegie/10a0f46df22d483bffe2488cfbde9f39 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
from itertools import product | |
policy_statuses = ['processing', 'active', 'pending-suspension', 'suspended', 'pending-cancellation', 'cancelled'] | |
vehicle_statuses = ['processing', 'active', 'inactive'] | |
inactive_user = [True, False] | |
failed_payments = [0,1,2,3] | |
expiring_user = [True, False] | |
cartesian_product = list(product(policy_statuses, vehicle_statuses, inactive_user, failed_payments, expiring_user)) | |
dictionary = {} | |
for product in cartesian_product: | |
dictionary[product] = '' | |
print(dictionary) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment