5 ms·
Python can’t even do multi line lambdas
by throwwaway8529 4y ago
Python can’t even do multi line lambdas
- Iwan-Zotow 4y agosure it can
- pasquinelli 4y agoit's been a while since i used python; have lambdas improved? i recall weird restrictions using them, but i can't quite remember what. this was pre puthon 3
- Iwan-Zotow 4y agoAssignment Expression were added, so you could do x = 1 y = 2 q = list(map(lambda t: ( tx := tx, ty := ty, tx+ty )[-1], [1, 2, 3])) print(q)