How to check if a string is empty in python?

Basilisk96 basilisk96 at gmail.com
Wed May 2 16:49:24 EDT 2007


A simple

if s:
    print "not empty"
else:
    print "empty"

will do.


-Basilisk96




More information about the Python-list mailing list