#coding=utf-8
#!/usr/bin/python

str1 = None;
str2 = '';
str3 = ' ';

if str1 == None :
    print("str1 is none.");
else :
    print("str1 is not none.");

if str2 == None :
    print("str2 is none.");
else :
    print("str2 is not none.");

if str2 == None or len(str2) == 0 :
    print("str2 is none.");
else :
    print("str2 is not none.");

if str3 == None or len(str3.strip()) == 0 :
    print("str3 is none.");
else :
    print("str3 is not none.");

 

相关文章:

  • 2021-12-04
  • 2021-12-04
  • 2022-02-08
  • 2021-07-24
  • 2022-12-23
  • 2022-12-23
  • 2021-12-04
  • 2021-12-10
猜你喜欢
  • 2022-12-23
  • 2021-08-18
  • 2021-07-14
  • 2021-12-01
  • 2022-12-23
  • 2021-09-04
  • 2022-12-23
相关资源
相似解决方案