Currently trying to nest two lambdas (where the variable for one lambda is defined as the second) and I keep getting an error.
print((lambda x: x*3) (lambda y: 5*y) (int(input())))
When I run this, it throws an error, citing that “*” is an unsupported operator for a function and integer.
How would I help the code understand that the second lambda is an integer?
I know this is rather excessive, but I’m trying to keep it to one line for the memes. I understand if this isn’t possible, it’s just more fun that way.
5
IIUC, you can add brackets:
print((lambda x: x * 3)((lambda y: 5 * y)(int(input()))))