We have many ways to check whether a list is empty or not:-
The first way we can check is by using its length:-
abc_list = list()
if len(abc_list) == 0:
print(“Empty list”)
The second way we can check by direct comparison whether the list is empty:-
abc_list = list()
if abc_list==[]:
print(“Empty list”)
To know more about this you can have a look at the following video tutorial:-