21.12.2022 Views

python_para_desenvolvedores_2ed

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Tipos 51

print 2 or 3 # Mostra 2

print not 0 # Mostra True

print not 2 # Mostra False

print 2 in (2, 3) # Mostra True

print 2 is 3 # Mostra False

Além dos operadores booleanos, existem as funções all(), que retorna

verdadeiro quando todos os itens forem verdadeiros na sequência usada

como parâmetro, e any(), que retorna verdadeiro se algum item o for.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!