How do I check if a list is empty in Python?

You can use not operator to check if a list is empty in Python. The same method can be used to check if any datatype is empty in Python as shown in the below example –

Leave a Reply