Answer:
The program to this question can be described:
Program:
def is_list_empty(Val):#defining method is_list_empty
return Val==None or len(Val)==0 #return value
print(is_list_empty([1,2,3,4])) #calling method and pass the value
print(is_list_empty([])) #calling method and doesn't pass any value
Output:
False
True
Explanation:
Description of the above python code can be described as follows:
- In the above python code, a method an is_list_empty is defined, that accepts an argument, that is "Val".
- Inside the method a "Val" variable is defined, that uses OR operator to check value that is "Val is equal to None or len(Val) is equal to 0, and returns its value, that is true or false.