The Python Oracle

Why do 'and' & 'or' return operands in Python?

This video explains
Why do 'and' & 'or' return operands in Python?

--

Become part of the top 3% of the developers by applying to Toptal
https://topt.al/25cXVn

--

Track title: CC P Beethoven - Piano Sonata No 2 in A

--

Chapters
00:00 Question
01:49 Accepted answer (Score 16)
05:05 Answer 2 (Score 3)
06:17 Answer 3 (Score 3)
07:18 Answer 4 (Score 1)
08:15 Thank you

--

Full question
https://stackoverflow.com/questions/2259...

Question links:
[http://docs.python.org/2/library/stdtype...]: http://docs.python.org/2/library/stdtype...
[http://learnpythonthehardway.org/book/ex...]: http://learnpythonthehardway.org/book/ex...

Accepted answer links:
[Truth Value Testing and Boolean Operators]: http://docs.python.org/2/library/stdtype...
[Short Circuit Evaluation at the Wikipedia Page]: http://en.wikipedia.org/wiki/Short-circu...
[Does Python support short-circuiting?]: https://stackoverflow.com/questions/2580...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #boolean #operands

#avk47