📅 2009-Sep-30 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ empty, list, python ⬩ 📚 Archive
= []
aList
if not aList: # Check if list is empty
print( "Empty" )
else:
print( "Not empty" )
42 )
alist.append(
if alist: # Check if list is not empty
print( "Not empty" )
else:
print( "Empty" )
# Output:
# Empty
# Not empty