Summary of Python methods for determining whether a list is empty

Summary of Python methods for determining whether a list is empty

def isNull(testTist):
    return len(testTist) == 0
    
def isNull(testTist):
    return testTist == []
    
def isNull(testTist):
    if not testTist:
        return False
    else:
        return True

Comments

Popular posts from this blog

Python Receiving and parse JSON Data via UDP protocol

ubus lua client method and event registration code demo/example