Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python if string is null or whitespace

def IsNullOrEmpty(x): # Returns true if null or empty
    nullorempty = False
    
    if not(x): 		# checks for nulls
        nullorempty = True
    if x.isspace(): # checks for blank strings
        nullorempty = True    
        
    return nullorempty    
 
PREVIOUS NEXT
Tagged: #python #string #null #whitespace
ADD COMMENT
Topic
Name
7+3 =