title: Find difference between list of dates in python
body: <p>I want to find difference between list of dates in days.</p>
  
  <p>I have a list of Timestamp object.</p>
  
  <pre><code>[Timestamp('2016-10-18 00:00:00'), Timestamp('2016-10-18 00:00:00'), Timestamp('2016-10-19 00:00:00'), Timestamp('2016-10-29 00:00:00'), Timestamp('2016-10-31 00:00:00'), Timestamp('2016-11-01 00:00:00'), Timestamp('2016-11-09 00:00:00'), Timestamp('2016-11-09 00:00:00'), Timestamp('2016-11-11 00:00:00'), Timestamp('2016-11-13 00:00:00'), Timestamp('2016-11-13 00:00:00')]
  </code></pre>
  
  <p>And I want the following result</p>
  
  <pre><code>[0,1,10,2,1,8,0,2,2,0]
  </code></pre>
  
  <p>I tried the following code but I am getting compilation error "TypeError: 'Timestamp' object is not iterable"</p>
  
  <pre><code>def calculateInterOrderTime(dateList):
     result = map(lambda x: [i / np.timedelta64(1, 'D') for i in np.diff([c for c in x])[0]],dateList)
     print(list(result))
  </code></pre>
  
  <p>It will be great if someone can help me with my lambda expression to do what I want.</p>