new snippets

This commit is contained in:
Rohit Tanwar
2018-02-01 13:49:59 +05:30
parent b5a1fa18ba
commit 55f39b14bd
27 changed files with 292 additions and 34 deletions

View File

@ -7,7 +7,6 @@ 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`.
```python
def zip(*args, fillvalue=None):
max_length = max([len(arr) for arr in args])
result = []