3 ms·
This specific case could be approximated with something like: >>> [(y:=x+1, z:= 2*y, -z)[-1] for x in range(1, 6)] [-4, -6, -8, -10, -12]
by eesmith 5y ago
This specific case could be approximated with something like:
>>> [(y:=x+1, z:= 2*y, -z)[-1] for x in range(1, 6)]
[-4, -6, -8, -10, -12]
- tpoacher 5y agoor, to state the obvious: def _(x): y = x+1; z = 2*y; return -z [ _(x) for x in range(1,6) ]