Jul-16-2019, 02:24 AM
Hi, i'm a bit confused with this code
error:
x=10 x=lambda : x+2 print(x())because the right side of the '=' is evaluated first so this should have returned 12 rather than reported an error as it did
error:
x=lambda : x+2 TypeError: unsupported operand type(s) for +: 'function' and 'int'Please explain why this code doesn't work