Question: how to calculate weeks between two dates in python?
Answer: #import date function from datetime module.
from datetime import date.
#provide the 1st date in YYYY,MM,DD format.
date1 = date(1999,12,23)
#provide the 1st date in YYYY,MM,DD format.
date2 = date(2001,5,11)
#getting the result, abs = absolute value.
#(date1-date2).days gives an integer number of dates.