Skip to main content
Source Link
Iron Fist
  • 11k
  • 2
  • 21
  • 36

If all you wanted is OneThree,OneFour,TwoThree,TwoFour,FiveThree,FiveFour then a double for loop will do the trick for you:

>>> for x in arr1:
        for y in arr2:
            print(x+y)

        
OneThree
OneFour
TwoThree
TwoFour
FiveThree
FiveFour

Or if you want the result in a list:

>>> [x+y for x in arr1 for y in arr2]
['OneThree', 'OneFour', 'TwoThree', 'TwoFour', 'FiveThree', 'FiveFour']