Unshamed plug of my project lambdex, which I worked out years ago to bring multilined lambda expressions in Python.
something(lambda x: [
x2 := x + 10, # define variables
[ print(f"Number: {i})
for i in range(x) ], # loop
[ 0 for i in range(x)
if print(f"Number: {i}") or True
if print(f"Second line: {i}") ], # loop if you prefer "normal code order"
0 if x > 0 else {}[f'{n} should be positive'], # conditions and asserts (throws KeyError, but includes the error message)
x2 * 2 # return
][-1])
note: I'm not responsible for coworkers injuring you after committing thisCome on. No. It has the benefit of working, but definitely not being idiomatic.