>>> import datetime >>> a = datetime.datetime.now() >>> # ...wait a while... >>> b = datetime.datetime.now() >>> print(b-a) 0:03:43.984000