Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import time
- from alphabetize import Alphabetize
- ab = Alphabetize()
- entry_data = "g"
- iterations = 10000
- sorted = ["a", "b", "d", "e", "f"]
- start = time.time()
- for i in range(iterations):
- new = ['a', 'c', 'f']
- ab.insert(new, sorted)
- print(sorted)
- print('took ' + str(time.time() - start) + ' seconds to do this')
- sorted = ["a", "b", "d", "e", "f"]
- start = time.time()
- for i in range(iterations):
- new = ['a', 'c', 'f']
- ab.merge(new, sorted)
- print(sorted)
- print('took ' + str(time.time() - start) + ' seconds to do this')
Add Comment
Please, Sign In to add comment