Colleague: “No, you cannot do functional programming in Python!”
Me: “Hold my pretzel.”
multiinsertL = (lambda list, new, old:
[] if not list
else [new, old, *multiinsertL(list[1:], new, old)] if list[0] == old
else [list[0], *multiinsertL(list[1:], new, old)])
![](https://blog.baukunst.io/wp-content/uploads/2023/05/te_cartoon_elephant_looks_at_us_and_winks_with_his_left_eye_067b9676-706c-4ac8-bf00-4185c90b1c28asd.png)