Here is my code:
import datetime
date = datetime.date(2015,10,1)
today = datetime..today()
oneday = datetime.timedelta(days = 1)
date_counter = 0
while not date == today:
date_counter+=1
date += oneday
In this code I use while loop to achieve my goal--to count the days between today and the specific day chosen by users.
However, I want to use for loop to do the same thing. Can it rewrite by for?