cart2_append()ΒΆ

FunctionalX.src.lists._cart2_append.cart2_append(list1, list2)ΒΆ

Append items from list2 to list1 for all possible pairs.

Append an element from the second list to the each element from the first list therefore increase the number of elements in each item in the first list.

Parameters:
  • list1 (list) – input list 1
  • list2 (list) – input list 2
Returns:

a new list.

Return type:

list

>>> cart_append([[1,2]], ['a','b']) 
[[1,2,'a'], [1,2,'b']]