Update snippet descriptions

This commit is contained in:
Isabelle Viktoria Maciohsek
2020-11-02 19:28:05 +02:00
parent 0ab4b3dbc5
commit 0a2f7993f7
24 changed files with 63 additions and 51 deletions

View File

@ -5,7 +5,8 @@ tags: list,beginner
Returns a list of elements that exist in both lists.
- Create a `set` from `a` and `b`, then use the built-in set operator `&` to only keep values contained in both sets, then transform the `set` back into a `list`.
- Create a `set` from `a` and `b`.
- Use the built-in set operator `&` to only keep values contained in both sets, then transform the `set` back into a `list`.
```py
def intersection(a, b):