Created
October 11, 2020 15:09
-
-
Save harshitsinghai77/724d67213dbcf1dcd91949ed841949cb to your computer and use it in GitHub Desktop.
A simple python programme to demonstrate some heavy calculation inside the function.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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