Returns the cartesian product of the passed iterables with the specified number of repetitions. The keyword argument `repeat` is read from kwargs to pass to itertools.cartesian. >>> seq.range(2).cartesian(range(2)) [(0, 0), (0, 1), (1, 0), (1, 1)]
(self, *iterables, **kwargs)
| 351 | return self._transform(transformations.tails_t(_wrap)) |
| 352 | |
| 353 | def cartesian(self, *iterables, **kwargs): |
| 354 | """ |
| 355 | Returns the cartesian product of the passed iterables with the specified number of |
| 356 | repetitions. |
| 357 | |
| 358 | The keyword argument `repeat` is read from kwargs to pass to itertools.cartesian. |
| 359 | |
| 360 | >>> seq.range(2).cartesian(range(2)) |
| 361 | [(0, 0), (0, 1), (1, 0), (1, 1)] |
| 362 | |
| 363 | :param iterables: elements for cartesian product |
| 364 | :param kwargs: the variable `repeat` is read from kwargs |
| 365 | :return: cartesian product |
| 366 | """ |
| 367 | return self._transform( |
| 368 | transformations.cartesian_t(iterables, kwargs.get("repeat", 1)) |
| 369 | ) |
| 370 | |
| 371 | def drop(self, n): |
| 372 | """ |