Skip to content

Instantly share code, notes, and snippets.

@truncs
Created January 22, 2012 04:34
Show Gist options
  • Save truncs/1655609 to your computer and use it in GitHub Desktop.
Save truncs/1655609 to your computer and use it in GitHub Desktop.
#! /usr/bin/python
def merge(a, size):
for i in range(0, len(a), size):
tmp = a[i:size + i];print tmp;
newtmp = []
for j in range(0, len(tmp)):
newtmp.append(tmp.pop(tmp.index(min(tmp))))
print newtmp
a[i:size + i] = newtmp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment