A lambda expression is used to create anonymous functions. There is nothing about the resulting function object that is different or special compared to a function created using a full, function definition statement. The only way you could probably tell it was created using a lambda expression is that the .__name__ attribute will be '<lambda>'. It is a convenience
lambda function has some restricions. For example it can't use = to assing value to variable. It can't use if without else - only special version value1 if state else value2. Probably It can't use return to exit in different moments. For more complex code normal function can be more useful and more readable - and simpler do debug.
.__name__attribute will be'<lambda>'. It is a convenience=to assing value to variable. It can't useifwithoutelse- only special versionvalue1 if state else value2. Probably It can't usereturnto exit in different moments. For more complex code normal function can be more useful and more readable - and simpler do debug.