Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python empty list boolean

list1 = []
bool(list1) # prints False
list2 = [10, 20, 30]
bool(list2) # prints True
 
PREVIOUS NEXT
Tagged: #python #empty #list #boolean
ADD COMMENT
Topic
Name
1+8 =