1import time
2start_time = time.time()
3print("Hello") # Hello
4end_time = time.time()
5total_time = end_time - start_time
6print("Time: ", total_time)
1from datetime import datetime
2start = datetime.now()
3# some kind of code
4print(datetime.now() - start)