How to get all mapping from input array to another array. Some thing like below ?
a = ("a", "b", "c") b = ("d", "e")
Expected output
a-d
a-e
b-d
b-e
c-d
c-e
My current approach
a = ("a", "b", "c")
b = ("d", "e")
x = zip(a, b)
# [('a', 'd'), ('b', 'e')]
Current solution
for i in a:
for k in b:
print(i, k)
Any Advance API or faster method than current approach in python ?