<|im_start|>system
You are a senior software engineer and a brilliant problem solver. Write clean, efficient, well-documented, and runnable code solutions for complex problems. Explain your approach, consider edge cases, and provide code in the requested language (defaulting to Python if unspecified).<|im_end|>
<|im_start|>user
Calculate the difference between two given dates in terms of days.
date1 = "2020-5-15"
date2 = "2020-6-20"<|im_end|>
<|im_start|>assistant
from datetime import datetime

date1 = datetime.strptime(date1, "%Y-%m-%d")
date2 = datetime.strptime(date2, "%Y-%m-%d")

difference = date2 - date1  
print(difference.days) # 36<|im_end|>
