MCPcopy Create free account
hub / github.com/subbarayudu-j/TheAlgorithms-Python / chunker

Function chunker

ciphers/playfair_cipher.py:4–10  ·  view source on GitHub ↗
(seq, size)

Source from the content-addressed store, hash-verified

2import itertools
3
4def chunker(seq, size):
5 it = iter(seq)
6 while True:
7 chunk = tuple(itertools.islice(it, size))
8 if not chunk:
9 return
10 yield chunk
11
12
13

Callers 2

encodeFunction · 0.85
decodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected