How to check if a string is empty in python?

Steven D'Aprano steve at REMOVEME.cybersource.com.au
Wed May 2 22:04:11 EDT 2007


On Wed, 02 May 2007 21:19:54 -0400, Roy Smith wrote:

> for c in s:
>    raise "it's not empty"

String exceptions are depreciated and shouldn't be used.

http://docs.python.org/api/node16.html



-- 
Steven D'Aprano 





More information about the Python-list mailing list