📜  如何在 lambda python 代码示例中使用 if else

📅  最后修改于: 2022-03-11 14:45:39.052000             🧑  作者: Mango

代码示例4
# Think of the lambda function as defining a REALLY small function without 
# a name.

# EXAMPLE #
lis = [2, 4, 6, 8]
output = lambda [parameter] : return True if [parameter] in lis else return False
print(output[4])