diff --git a/README.md b/README.md index 81dd3a551..6b345c673 100644 --- a/README.md +++ b/README.md @@ -318,6 +318,8 @@ spread([1,2,3,[4,5,6],[7],8,9]) # [1,2,3,4,5,6,7,8,9] ``` ### zip +:information_source: Already implemented via `itertools.zip_longest()` + Creates a list of elements, grouped based on the position in the original lists. Use `max` combined with `list comprehension` to get the length of the longest list in the arguments. Loops for `max_length` times grouping elements. If lengths of `lists` vary `fill_value` is used. By default `fill_value` is `None`. diff --git a/scripts/lint.py b/scripts/lint.py index bfe053161..6a8bd72bd 100644 --- a/scripts/lint.py +++ b/scripts/lint.py @@ -6,6 +6,7 @@ files = os.listdir('snippets') codeRe = "```\s*python([\s\S]*?)```" for file in files: someFile = open("snippets/" + file) + print(file) fileData = someFile.read() someFile.close() originalCode = re.search(codeRe,fileData).group(0) diff --git a/snippets/zip.md b/snippets/zip.md index 0d171a662..d49a02f33 100644 --- a/snippets/zip.md +++ b/snippets/zip.md @@ -1,5 +1,7 @@ ### zip +:information_source: Already implemented via `itertools.zip_longest()` + Creates a list of elements, grouped based on the position in the original lists. Use `max` combined with `list comprehension` to get the length of the longest list in the arguments. Loops for `max_length` times grouping elements. If lengths of `lists` vary `fill_value` is used. By default `fill_value` is `None`.