[BangPypers] Truth Tests (bool)
Gora Mohanty
gora at mimirtech.com
Tue Jan 10 18:25:58 CET 2012
On Tue, Jan 10, 2012 at 10:28 PM, Ganesh Kumar <bugcy013 at gmail.com> wrote:
> Hi Guys,
>
>>>> 3 and 4, [3, 4] and []
> (4, [])
>>>> 3 and 4
> 4
>
> How to compare value in logical operation
>
> empty list [] = False
> How to and operation working, please guide me guys.
Google turns up a few million links (literally) for
"Python truth test". Take a look at
http://python.about.com/od/pythonstandardlibrary/p/truth_values.htm
for example.
It is not clear what you want from your description.
To check if a list is empty, see if len( list ) is zero.
Regards,
Gora
More information about the BangPypers
mailing list