summaryrefslogtreecommitdiff
path: root/src/main/python/utils/funcs.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/python/utils/funcs.py')
-rw-r--r--src/main/python/utils/funcs.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/python/utils/funcs.py b/src/main/python/utils/funcs.py
new file mode 100644
index 0000000..7796ece
--- /dev/null
+++ b/src/main/python/utils/funcs.py
@@ -0,0 +1,5 @@
+from itertools import zip_longest
+
+def grouper(n, iterable, fillvalue=None):
+ args = [iter(iterable)] * n
+ return zip_longest(fillvalue=fillvalue, *args) \ No newline at end of file