14 lines
299 B
Python
14 lines
299 B
Python
""" """
|
|
|
|
def clean_dict(data_dict: dict) -> dict:
|
|
cleaned = {}
|
|
for key, value in data_dict.items():
|
|
|
|
if isinstance(value, str) and not value.strip():
|
|
cleaned[key] = None
|
|
|
|
else:
|
|
cleaned[key] = value
|
|
return cleaned
|
|
|