Skip to content

Instantly share code, notes, and snippets.

@martin-martin
Created February 3, 2021 10:31
Show Gist options
  • Save martin-martin/2cac8879ce0e74980e6a4da2a2726113 to your computer and use it in GitHub Desktop.
Save martin-martin/2cac8879ce0e74980e6a4da2a2726113 to your computer and use it in GitHub Desktop.
tag decorator
def tag(msg,tag):
def wrapping():
return f'<{tag}> {msg} </{tag}>'
return wrapping
string = input('Please, type in a sentence: ')
tg = input('Please, type in an HTML tag you want: ')
a = tag(string, tg)
print(a())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment