How to check if a list is empty in python

How to check if a list is empty,in this topic you will learn verifying list is empty or not in python language with the help of simple code.

Below is the code:a=[];

I’m checking a is empty or not using for loop as below

if not a:
  print("List is empty")


ALSO READ  How to get the number of Elements in a list in Python

Selenium Webdriver Using Python – Complete Tutorial Guide

 a = []
 except IndexError:
  print("List is empty")

Rajesh K