Example code list isEmpty in Python
def isEmpty(v): if not v: return "List is empty" else: return "List is Not empty" list1 = [1, 2, 3, 4] print(isEmpty(list1))
Do comment if you have any doubts and suggestions on this list topic.
Note: IDE: PyCharm 2021.1.3 (Community Edition)
All Python Examples are in Python 3, so Maybe its different from python 2 or upgraded versions.
Degree in Computer Science and Engineer: App Developer and has multiple Programming languages experience. Enthusiasm for technology & like learning technical.