Skip to content

Instantly share code, notes, and snippets.

@kvasdopil
Last active December 18, 2015 11:42
Show Gist options
  • Save kvasdopil/1549ec228d73867ef270 to your computer and use it in GitHub Desktop.
Save kvasdopil/1549ec228d73867ef270 to your computer and use it in GitHub Desktop.
in1 = [...]
in2 = [...]
out = []
while len(in1) and len(in2):
if in1[0] > in2[0]:
out.append(in1.pop(0))
else
out.append(in2.pop(0))
if len(in1):
out.append(in1)
else
out.append(in2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment