Skip to main content
edited title
Link
anderson
  • 107
  • 1
  • 3
  • 11

possible unique combinations between between two arrays(of different size) in python?

Source Link
anderson
  • 107
  • 1
  • 3
  • 11

possible combinations between between two arrays in python?

arr1=['One','Two','Five'],arr2=['Three','Four']

like itertools.combinations(arr1,2) gives us
('OneTwo','TwoFive','OneFive')
I was wondering is there any way applying this to two different arrays.?I mean for arr1 and arr2.

Output should be OneThree,OneFour,TwoThree,TwoFour,FiveThree,FiveFour