Could be better, but that is what mainstream gets.
>>> def progn(*args): ... if args: ... return args[-1] ... else: ... return None ... >>> fun = lambda x : progn(print('abc'), ... print(x), ... print('def')) >>> >>> fun(42) abc 42 def