exactly on which containers can the in operator be applied?
Generally the rule of thumb is (not a fact but a doctrine):
if container is iterable => in can be applied
ex. of such containers- (str, list, tuple, set and dict)
#note1:
by iterable i mean we can iterate like this:
for x in list_object: or for y in dict_obj:
#note2:
not in operator just have opposite definition to that of in
but above rule of thumb is true for not in as well ofcourse.