day1 solved assignments
day1 solved assignments
print(x is y)
# returns False because x is not the same object as y, even if they have thew same content
print(x == y)
# to demonstrate the difference betweeen "is" and "==": this comparison returns True because x
is equal to y
EX Demo of “in” operator
x = ["apple", "banana"]
print("banana" in x)
# returns True because a sequence with the value "banana" is in the list
Ex Demo of “not in” operator
x = ["apple", "banana"]
print("pineapple" not in x)
# returns True because a sequence with the value "pineapple" is not in the list