Some Python utility functions and classes I use often.
You can wrap an iterable with biter() and then method-chain .filter() and
.map(), like you might in JavaScript. There's also .reduce()
from udutils import biter
my_iterable = [i for i in range(6)]
print(
biter(my_iterable)
.filter(lambda num: num > 2)
.map(lambda num: num**2)
.reduce(lambda num, acc: acc + ' ' + str(num), "results:")
)
# results: 9 16 25