The error you encountered is due to the fact that you are trying to perform the multiplication operation between a lambda function (a) and an integer (c). In Python, you cannot directly multiply a function with an integer.
To achieve what you want, you can create a single lambda function with two arguments (b and c) and return their sum and product, like this:
def func(x):
a = lambda b, c: (x + b, x * c)
return a
Now, you can call the func function and then the returned lambda function with two arguments:
myFunc = func(4)
result_sum, result_product = myFunc(6, 6)
print("Sum:", result_sum) # Output: Sum: 10 (4 + 6)
print("Product:", result_product) # Output: Product: 24 (4 * 6)
Here, we define a lambda function with two arguments b and c, and we return a tuple containing their sum and product. By doing this, you can use a single lambda function to compute both the sum and the product of the input values.
If you need to keep the intermediate results and use them in subsequent operations, you can store them in variables and pass them to the lambda function as needed. However, the lambda function itself can only take the arguments specified in its definition.