Python Programming - Lists - Discussion

Discussion Forum : Lists - General Questions (Q.No. 26)
26.
How can you check if a list is empty in Python?
if list.is_empty()
if list == []
if not list:
if len(list) == 0
Answer: Option
Explanation:
Checking if not list: is a common way to check if a list is empty in Python.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.