0
I would like to learn an easier way to check all items on a list and search for repeated strings.
I’m currently doing it this way:
elif "azul" in fios[0] and fios[1] or "azul" in fios[1] and fios[2] or "azul" in fios[0] and fios[2]:
print("Corte o último fio azul")
My intention is to check if there is more than one "blue" inside the yarn list, the code is working, but I’d like to make it more practical.
Elif wires.Count("blue") is >= 2: turned right?
– TulioBRK
You don’t have the operator
is
, only the>=
– Woss