glue/glue.py
Tyrel Souza a3479b618d Tests
2014-10-30 14:07:41 -04:00

8 lines
391 B
Python

from collections import OrderedDict
def glue(*args, **kwargs):
what_to_glue = list(args)
kwargs = OrderedDict(sorted(kwargs.items(), key=lambda t: t[0])) # I dont care what order you submit them in, they will be alphabetical
what_to_glue.extend([v for k,v in kwargs.iteritems()]) # Ignore all your keys, because you're doing this wrong anyway
return " ".join(what_to_glue)