Update snippet titles

This commit is contained in:
Isabelle Viktoria Maciohsek
2022-02-10 22:09:42 +02:00
parent 2a16eb9892
commit 448cb3b532
24 changed files with 29 additions and 29 deletions

View File

@@ -1,11 +1,11 @@
---
title: bifurcate
title: Bifurcate list based on values
tags: list,intermediate
firstSeen: 2019-08-20T12:37:06+03:00
lastUpdated: 2020-11-02T19:27:07+02:00
---
Splits values into two groups, based on the result of the given `filter` list.
Splits values into two groups, based on the result of the given `filter` list.
- Use a list comprehension and `zip()` to add elements to groups, based on `filter`.
- If `filter` has a truthy value for any element, add it to the first group, otherwise add it to the second group.