# Assuming the variable is in Python
# Method 1: Using 'if' condition
if variable:
print("The variable is not empty")
else:
print("The variable is empty")
# Method 2: Using 'not' operator
if not variable:
print("The variable is empty")
else:
print("The variable is not empty")
# Method 3: Using built-in function (len() for strings, lists, etc.)
if len(variable) == 0:
print("The variable is empty")
else:
print("The variable is not empty")
# Method 4: Using type-specific checks
if isinstance(variable, str) and not variable:
print("The string variable is empty")
elif isinstance(variable, list) and not variable:
print("The list variable is empty")
elif isinstance(variable, dict) and not variable:
print("The dictionary variable is empty")
# Add more type-specific checks as needed
else:
print("The variable is not empty")