Lambda Condity Python
f = lambda parameter : exp1 if cond else exp2
# example
f = lambda x: "even" if x%2==0 else "odd"
LolBroo
f = lambda parameter : exp1 if cond else exp2
# example
f = lambda x: "even" if x%2==0 else "odd"
# Define echo_word as a lambda function: echo_word
echo_word = (lambda word1, echo: word1 * echo)
# Call echo_word: result
result = echo_word('hey', 5)
# Print result
print(result)
# lambda arguments : expression
x = lambda a : a + 10
print(x(5)) # 15