Update syntax highlighting, update allUnique

This commit is contained in:
Angelos Chalaris
2019-08-20 10:09:53 +03:00
parent 59fd9ad9a8
commit 0f405f0da9
35 changed files with 73 additions and 72 deletions

View File

@ -6,7 +6,7 @@ Deep flattens a list.
Use recursion. Use `list.extend()` with an empty list (`result`) and the spread function to flatten a list. Recursively flatten each element that is a list.
```python
```py
def spread(arg):
ret = []
for i in arg:
@ -24,6 +24,6 @@ def deep_flatten(lst):
return result
```
```python
```py
deep_flatten([1, [2], [[3], 4], 5]) # [1,2,3,4,5]
```