I was using a lambda statement to perform math, and happened to repeatedly use one certain value. Therefore I was wondering if it was possible to assign and use
lambda
You can assign variables in lambda functions is you use exec:
>>> a = lambda: exec('global x; x = 1') >>>a() >>>x 1