Turn into a lambda function

Report a typo

Re-write the following piece of code using the lambda keyword:

def func(x):
    if x % 10 == 0:
        return "x ends with 0"
    else:
        return "x doesn't end with 0"

You are not supposed to handle input or invoke this function. Just re-write it!

Sample Input 1:

5

Sample Output 1:

x doesn't end with 0

Sample Input 2:

10

Sample Output 2:

x ends with 0

Sample Input 3:

2

Sample Output 3:

x doesn't end with 0
Write a program in Python 3
# Don't forget to make use of lambda functions in your solution
func = lambda ... # noqa: E731
___

Create a free account to access the full topic