title: Convert range of two date time's into a list of dates and count of seconds per that date python
body: <p>I'm interested in creating a function that gets two following <code>datetime</code> objects (start date and end date) as input and returns a list of tuples. I would like a tuple for each date between start and end date, and the number of seconds in this date. For example:</p>
  
  <pre><code>import datetime
  #there are total 86400 seconds within a date
  start_date=datetime.datetime(2017, 10, 17,22,30,0) # this has 60*60+60*30= 5400 within that date
  end_date=datetime.datetime(2017, 10, 19,10,30,11) # this date has  10*60*60+60*30+11=37811 seconds
  
  desired_list_of_tupple=[(datetime.datetime(2017, 10, 17),5400),(datetime.datetime(2017, 10, 18),86400),(datetime.datetime(2017, 10, 19),37811)]
  </code></pre>
  
  <p>For 2017-10-17 number of seconds is 5400 (number of seconds between 22:30 and midnight.</p>
  
  <p>For 2017-10-18 number of seconds is 86400 (whole day is in range).</p>
  
  <p>For 2017-10-19 number of seconds is 37811 (number of seconds from midnight  up until 10:30:11 ).</p>
  
  <p>Any help on that would be great!</p>