Skip to content

Instantly share code, notes, and snippets.

@2KAbhishek
Created June 19, 2020 23:05
Show Gist options
  • Save 2KAbhishek/b522179dfe95007800279e529747f5ee to your computer and use it in GitHub Desktop.
Save 2KAbhishek/b522179dfe95007800279e529747f5ee to your computer and use it in GitHub Desktop.
Time and Space used in Python
import time, sys
start = time.clock()
for x in range(1000):
pass
end = time.clock()
total = end - start
print("Time : " + total)
# Using total for demo
peint("Size : " + sys.getsizeof(total))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment