In the following python code, both lambda functions return the same value, which is x:
x = [2 , 3 , 4 , 5 , 6 , 7 , 8]
print(lambda x: x == 2)
print(lambda x: x if x == 2 else None)
From my understanding, the first lambda function is also an if statement, but I don't quite understand its syntax.