I have an arbitrarily nested iterable like so:
numbers = (1, 2, (3, (4, 5)), 7)
and I\'d like to map a function over it without changing the st
def recursive_map(f, it): return (recursive_map(f, x) if isinstance(x, tuple) else f(x) for x in it)