#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.");
时间: 2024-12-31 03:57:58