Skip to content

Instantly share code, notes, and snippets.

@tbarbugli
Last active July 26, 2017 12:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tbarbugli/3003de86f90fca5841b012787759fb87 to your computer and use it in GitHub Desktop.
Save tbarbugli/3003de86f90fca5841b012787759fb87 to your computer and use it in GitHub Desktop.
import random
random.seed(1)
l = []
for i in range(1, 10000):
r = random.randint(1, 1000)
append_sorted(l, r)
print(l)
def append_sorted(l, el):
l.append(el)
l.sort()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment