True0 or True
True1 and True
11 or True
Please explain how to generate different output in following logical operations
00 and True
True0 or True
True1 and True
11 or True
The evaluation of "x and y" first evaluates "x";
Please explain how to generate different output in following logical operations
00 and True
True0 or True
True1 and True
11 or True
On Tue, 8 Nov 2022 at 03:08, ICT Ezy <ict...@gmail.com> wrote:Thank you very much, I understood Cleary.
Please explain how to generate different output in following logical operations
Hi,00 and True
True0 or True
True1 and True
11 or True
The exact explanation of how 'and' and 'or' behave can be read here: https://docs.python.org/3/library/stdtypes.html#boolean-operations-and-or-not The "Notes" there explain what you see.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (2 / 14) |
Uptime: | 54:41:46 |
Calls: | 10,397 |
Calls today: | 5 |
Files: | 14,067 |
Messages: | 6,417,416 |
Posted today: | 1 |