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

Posted by Pinki | Updated on

If you want to check if a list is empty in Python, then use the following Python code.

Using the implicit booleanness of the empty list is quite pythonic.

If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@] Your question and answer will appear on and help other developers.

Related Questions & Answers