Skip to content

Instantly share code, notes, and snippets.

@thinkphp
Created December 6, 2011 10:45
Show Gist options
  • Select an option

  • Save thinkphp/1437749 to your computer and use it in GitHub Desktop.

Select an option

Save thinkphp/1437749 to your computer and use it in GitHub Desktop.
merge-demo.py
'''
Merging two arrays or three..or four..or five..or ...n :P
by Adrian Statescu <adrian@thinkphp.ro>
MIT Style License
'''
import merge
l = ([2,4,6,8],[1,3,5,7,9],[11,12,13,14,15,16,17])
i = 1;
ll = l[0]
while i<len(l):
ll = merge.merge(ll,l[i])
i +=1
print ll
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment