thanhnt-cf's picture
initial commit
8ba64a4
raw
history blame
357 Bytes
def product_data_to_str(product_data: dict[str, any]) -> str:
"""
Convert product data to a string.
Args:
- product_data: a dictionary of product data
Returns:
- a string representation of the product data
"""
if product_data is None:
return ""
return "\n".join([f"{k}: {v}" for k, v in product_data.items()])