Python verificar se o item existe em um conjunto
Verificar se o item existe em um conjunto
Para determinar se um item especificado está presente em um conjunto, use a in
palavra-chave:
Exemplo
Verifique se "apple" está presente no conjunto:
thisset = {"apple", "banana", "cherry"}
if "apple" in thisset:
print("Yes, 'apple' is in this set")