it's not duplicate don't close it I have a dictionary as
{a:[a,b,c,d,e,f],b:[a,b,c,e,g],c:[a,b,h]}
I need to print a list of all keys that their value contain [a,b,c]
so in my example, I expect the output to be :
[a,b]
and not c as it just contains a and b only I tried :
error = []
for key in sites.keys():
if ("a" and "b" and "c") in sites[key]:
error.append(sites[key])
but I got :
[a,b,c]
what can I do?
and it's not answered here: How to test multiple variables against a value?
cuz my case is I need all values in my list to be found not an or and I tried and but didn't work as I mentioned