2
I have a list that stores data:
[(pizzas, 'COMIDA'), (1, 'QUANTIDADE'), (chocolate, 'SABOR'), (1, 'QUANTIDADE'), (catupiry, 'SABOR'), (1, 'QUANTIDADE'), (morango, 'SABOR')]
I’d like to check what’s on my list.
Example: if you have the token COMIDA
, or Quantidade
, or SABOR
, or both, I would like you to return to me the following exit:
COMIDA = true ou a quantidade QUANTIDADE = true ou a quantidade SABOR = true ou a quantidade
Another thing, it is possible also from the Token (Example: COMIDA
), return me 'pizzas', or SABOR
return chocolate, morango, catupiry
?
Thank you very much ! , but in the case of the dictionary, how would I filter the elements I want? example check which keys are present and their related content??
– Douglas Rodrigues
the keys must always be present the content is that may not exist your key is like a way to find the content what you can do is a if inside the for I will edit the answer to help you a little more
– ScrapBench