From 81ba93e59644f92bd9e84cab15f6f82b00211d91 Mon Sep 17 00:00:00 2001 From: 30secondsofcode <30secondsofcode@gmail.com> Date: Thu, 31 Oct 2019 07:35:32 +0000 Subject: [PATCH] Travis build: 187 --- README.md | 2 +- snippet_data/snippetList.json | 2 +- snippet_data/snippets.json | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 69d501b1a..7e817f8bf 100644 --- a/README.md +++ b/README.md @@ -1176,7 +1176,7 @@ Loop for `max_length` times grouping elements. If lengths of `lists` vary, use `fill_value` (defaults to `None`). ```py -def zip(*args, fillvalue=None): +def zip(*args, fill_value=None): max_length = max([len(lst) for lst in args]) result = [] for i in range(max_length): diff --git a/snippet_data/snippetList.json b/snippet_data/snippetList.json index 129c20339..0866a8f60 100644 --- a/snippet_data/snippetList.json +++ b/snippet_data/snippetList.json @@ -1221,7 +1221,7 @@ ] }, "meta": { - "hash": "8c0dea46f260c7edfa363a0a295683d858c2011c9220b2d4fc53025a684388f0" + "hash": "7741a05775275c2b463f0a110d70b130393857f2c391e571ecc1dcd4c0e94809" } } ], diff --git a/snippet_data/snippets.json b/snippet_data/snippets.json index ce48794f0..2d921339e 100644 --- a/snippet_data/snippets.json +++ b/snippet_data/snippets.json @@ -1606,7 +1606,7 @@ "fileName": "zip.md", "text": "Creates a list of elements, grouped based on the position in the original lists.\n\n\nUse `max` combined with `list comprehension` to get the length of the longest list in the arguments. \nLoop for `max_length` times grouping elements. \nIf lengths of `lists` vary, use `fill_value` (defaults to `None`). \n\n", "codeBlocks": { - "code": "def zip(*args, fillvalue=None):\n max_length = max([len(lst) for lst in args])\n result = []\n for i in range(max_length):\n result.append([\n args[k][i] if i < len(args[k]) else fillvalue for k in range(len(args))\n ])\n return result", + "code": "def zip(*args, fill_value=None):\n max_length = max([len(lst) for lst in args])\n result = []\n for i in range(max_length):\n result.append([\n args[k][i] if i < len(args[k]) else fillvalue for k in range(len(args))\n ])\n return result", "example": "zip(['a', 'b'], [1, 2], [True, False]) # [['a', 1, True], ['b', 2, False]]\nzip(['a'], [1, 2], [True, False]) # [['a', 1, True], [None, 2, False]]\nzip(['a'], [1, 2], [True, False], fill_value = '_') # [['a', 1, True], ['_', 2, False]]" }, "tags": [ @@ -1616,7 +1616,7 @@ ] }, "meta": { - "hash": "8c0dea46f260c7edfa363a0a295683d858c2011c9220b2d4fc53025a684388f0" + "hash": "7741a05775275c2b463f0a110d70b130393857f2c391e571ecc1dcd4c0e94809" } } ],