Source Code:
(back to article)
my_list = [1, 2, 3, 4] if 3 in my_list: print("3 is in the list") else: print("3 is not in the list")
Result:
Report an issue