(转载)http://qianchenglong.github.io/2014/12/05/python%E5%88%A4%E6%96%AD%E5%AD%97%E7%AC%A6%E4%B8%B2%E6%98%AF%E5%90%A6%E4%B8%BA%E7%A9%BA/html
1234
if not string: print('not empty')else: print('empty')
if string == '': print('not empty')else: print('empty')