Question about lazy evaluation in python | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 1

Question about lazy evaluation in python

When using an ā€˜orā€™ statement or an ā€˜andā€™ statement to compare 2 non-boolean values, why does ā€˜orā€™ return the first value and why does ā€˜andā€™ return the second? For example: 3 or 7 returns 3, 3 and 7 returns 7.

9th Aug 2019, 10:42 PM
Nathan
0 Resposta