On Tue, 2008-07-15 at 14:37 -0400, Victor Noagbodji wrote:
Hello,
>
what's the difference between these two statement? And which one should one use?
>
>
what's the difference between these two statement? And which one should one use?
>
post, not just the subject header.
The two statements in question are:
if name is not None:
and
if name:
The difference?
name=''
if name is not None:
print "name is not None."
if name:
print "name is."
Give it a whirl.
Cheers,
Cliff