pre - calculation of all combinations
combi ( 100 , 100 ) NEW_LINE arr = [ 1 , 2 , 3 , 4 ] NEW_LINE n = len ( arr ) NEW_LINE k = 3 NEW_LINE ans = product ( arr , n , k ) NEW_LINE print ( ans ) NEW_LINE