Null String Variable

Klaus Alexander Seistrup klaus at seistrup.dk
Mon May 16 17:18:14 EDT 2005


Rotary wrote:

> I want to say something like that: if msg is empty ...then do 
> something. So how can i figure that msg is empty string (no 
> character, msg = ''). 

#v+

if not msg:
    print 'msg is empty'

#v-

-- 
Klaus Alexander Seistrup
Magnetic Ink, Copenhagen, Denmark
http://magnetic-ink.dk/



More information about the Python-list mailing list