I attempted this list comprehension:
[sqrt(x), x**2 for x in range(rng)] but apparently this syntax doesn't work. I suppose I could do something like this:
[fn(x), fn(x) for x in range(rng) for fn in (sqrt(), lambda x: x**2)] but is there no cleaner way?
Edit: let's say rng is 3. I'd want an output of [0, 0, 1, 1, √2, 4]