<gh_stars>0
def tags(tag_name):
    def tags_decorator(func):
        def func_wrapper(name):
            return "<{0}>{1}</{0}>".format(tag_name, func(name))
        return func_wrapper
    return tags_decorator

@tags("p")
def get_text(name):
    return "Hello "+name


print get_text("John")
# Outputs <p>Hello John</p>



# Try ========
@tags("xml")
def get_xml_text(name):
    return "hi" + name

print get_xml_text('lilili')

def tags(tag_name):
    def tags_decorator(func):
        def func_wrapper(name):
            return "<{0}>{1}</{0}>".format(tag_name, func(name))
        return func_wrapper
    return tags_decorator

@tags("p")
def get_text(name):
    return "Hello "+name


print get_text("John")
# Outputs <p>Hello John</p>



# Try ========
@tags("xml")
def get_xml_text(name):
    return "hi" + name

print get_xml_text('lilili')
# Outputs <p>Hello John</p> # Try ========