get datetime range between two dates in python? I have implemented below code to get date range – from datetime import timedelta, date,datetime