mardi 29 septembre 2020

How to check elements of a list of variable length in an if statement python

I am new to python

I have a list of flags. and that list has a variable length. I want to check if all the variables in that list are true

I have tried

    if (all  in flags[x]==True):
    finalFlags[x-1]=True

But that turned the final flag true when only one flag is true

Aucun commentaire:

Enregistrer un commentaire