Im having an issue with the order of operation in python see below code. I have a nested if that I would like condensed down to one line.
The below code reads if "a" and "b" and "c" in list pass or if "c" is in list pass too regardless of abc. I want the code to read if "a" and "b" in list and either "c" or "d" is in list pass
if "a" and "b" in list:
if "c" or "d" in list:
print()
if "a" and "b" in list and "c" or "d" in list:
print()
# keyerror "d" not in list