diff --git a/README.md b/README.md index 23e66fd..c0b1f09 100644 --- a/README.md +++ b/README.md @@ -4,4 +4,7 @@ How to use Glue >>> from glue import glue >>> print glue("any","number","of","things","together") any number of things together + +>>> print glue("any","number","of","things","together",where="anywhere") +any number of things together anywhere ``` diff --git a/glue.py b/glue.py index a4d8949..afe5602 100644 --- a/glue.py +++ b/glue.py @@ -1,3 +1,4 @@ -__author__ == "Tyrel Souza " -def glue(*args): - return " ".join((args)) +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)