No, lambda functions in Python can only contain a single expression.
This is because a lambda function is designed to be a simple and concise way to define a function for use in a specific context (e.g., as an argument to a higher-order function like filter() or map()), and as such, it is limited to a single expression.
If you need to perform more than one operation in a function, you can define a regular function using the def keyword instead. Regular functions can contain multiple statements and expressions, making them more flexible than lambda functions. Here is an example of a regular function that adds two numbers and then multiplies the result by a third number:
def my_function(x, y, z):
sum = x + y
product = sum * z
return product
In this example, we define a function called my_function that takes three arguments, x, y, and z. The function first calculates the sum of x and y, stores the result in a variable called sum, multiplies the sum by z, and returns the result.