Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to check list is empty or not

l1 = ["Hire", "the", "top", "1%", "freelancers"]

l2 = []

if l2:
    print("list is not empty")
else:
    print("list is empty")

#Output: "list is empty"
Source by www.howtouselinux.com #
 
PREVIOUS NEXT
Tagged: #check #list #empty
ADD COMMENT
Topic
Name
5+7 =