code.py
import datetime data1 = datetime.datetime.now() data2 = datetime.datetime.now() diff = data2 - data1 days, seconds = diff.days, diff.seconds hours = days * 24 + seconds // 3600 minutes = (seconds % 3600) // 60 seconds = seconds % 60 print hours,minutes,seconds