On Tue, Jan 10, 2012 at 7:43 AM, Anand Chitipothu wrote:
> 2012/1/4 Navin Kabra
>
> > On Wed, Jan 4, 2012 at 11:37 AM, Kenneth Gonsalves
> > wrote:
> > > can anyone recommend a python framework for android?
> >
> > Negative vote for SL4A (previously known as ASE - Android Scripting
> > Environme
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.
Did I learn something today? If not, I wasted it.
___
BangPypers mailin
They are called Python Logic Short Circuits.
A good way to remember this is here
http://uthcode.appspot.com/blog/2011/07/Python-Logic-short-circuits#comment-266357377
For your other question, an empty list is always fast.
--
Senthil
On Tue, Jan 10, 2012 at 10:28:43PM +0530, Ganesh Kumar wrote
On Tue, Jan 10, 2012 at 10:28 PM, Ganesh Kumar 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 (literal
On Tue, Jan 10, 2012 at 10:55:58PM +0530, Gora Mohanty wrote:
> To check if a list is empty, see if len( list ) is zero.
I think, usually we just test the empty list for it's False-ness.
Isn't it?
--
Senthil
___
BangPypers mailing list
BangPypers@pyth
This does look super-simple! Linky :
http://www.youtube.com/watch?v=qGPostUOAEI
-Venkat
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers
HI.
> I think, usually we just test the empty list for it's False-ness.
> Isn't it?
>
> In [8]: x = []
In [9]: bool(x)
Out[9]: False
-Ganesh.
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers
Gora Mohanty writes:
[...]
> It is not clear what you want from your description. To check if a
> list is empty, see if len( list ) is zero.
[...]
You don't want to do that. Your "list" might be a generator (unless you
check for type which is a bad idea anyway) and "len"ing that will
consume