Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save harshitsinghai77/724d67213dbcf1dcd91949ed841949cb to your computer and use it in GitHub Desktop.
Save harshitsinghai77/724d67213dbcf1dcd91949ed841949cb to your computer and use it in GitHub Desktop.
A simple python programme to demonstrate some heavy calculation inside the function.
import time
import datetime
start = datetime.datetime.now()
def two():
print("Starting two")
time.sleep(4)
print("Hey two")
def four():
print("Starting four")
time.sleep(2)
print("Hey four")
two()
four()
print(f'{datetime.datetime.now()-start}')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment