Or and and in python

if "video" not in json.dumps (content):

            if "cover_web" not in json.dumps(content):
            

can these two if be written in or and and forms

such as if video not in or if cover_web not in

Aug.27,2021

can be written together, but for your logic, you should use and instead of or, that's what it is:

content = json.dump(content)
if "video" not in content and "cover_web" not in content:

can be written together, but it is recommended that the json.dumps (content) operation can set the variables to be written on a single line, which will be clearer in the if logic statement

.
Menu