Travis build: 82
This commit is contained in:
@ -444,11 +444,11 @@ every([1, 2, 3]) # True
|
||||
|
||||
Returns every nth element in a list.
|
||||
|
||||
Use `[1::nth]` to create a new list that contains every nth element of the given list.
|
||||
Use `[nth-1::nth]` to create a new list that contains every nth element of the given list.
|
||||
|
||||
```py
|
||||
def every_nth(lst, nth):
|
||||
return lst[1::nth]
|
||||
return lst[nth-1::nth]
|
||||
```
|
||||
|
||||
<details>
|
||||
|
||||
Reference in New Issue
Block a user