lookahead
Yield pairs of (current, next) items in it.
def lookahead(
it: iterable
) - > zip_longest
Yield pairs of (current, next) items in it.
Parameters
| Name | Type | Description |
|---|---|---|
| it | iterable | The input sequence or generator to be processed into lookahead pairs. |
Returns
| Type | Description |
|---|---|
zip_longest | An iterator of tuples where each tuple contains the current item and the subsequent item from the input iterable, with None as the final 'next' value. |