Answers for "empty list check in python"

8

empty list in python

# Python program to declare 
# empty list 

# list is declared 
a = []
Posted by: Guest on February-24-2020
3

empty list check in python

if not a:
  print("List is empty")
Posted by: Guest on January-02-2021
0

can python tell if a list is empty

>>> if len(a)==0:
    print ("list is empty")
else:
    print ("list is not empty")
Posted by: Guest on November-26-2019

Python Answers by Framework

Browse Popular Code Answers by Language