📜  python lambda 函数 if else - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:09.871000             🧑  作者: 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])