def glue(*args, **kwargs): what_to_glue = list(args) what_to_glue.extend([v for k,v in kwargs.iteritems()]) return " ".join(what_to_glue)