7 ms·
It's possible to execute statements in a lambda through exec. But it's more of hack than what it worth. print((lambda x: [exec('x = x + 1; result = x'), eval
by mistaken 5y ago
It's possible to execute statements in a lambda through exec. But it's more of hack than what it worth.
print((lambda x: [exec('x = x + 1; result = x'), eval('result')][1])(1))