6 kyu

@htmlize

Description:

Implement the htmlize decorator, which takes in a string argument and uses it to wrap a function's return value in html tags. Your decorator must be composable (i.e., it must be possible to do several decorations in a row) and well-behaved (i.e., your decorator must not change the name or docstring of the decorated function).

Example :

@htmlize('section')
@htmlize('blockquote')
def generate_lorem(n_sentences):
  ... # Contents hidden for brevity
  
print(generate_lorem(1))

# Prints the following :
<section><blockquote>Has nominavi soleat eu homero has te ancillae.</blockquote></section>
Fundamentals

Stats:

CreatedNov 7, 2017
PublishedNov 9, 2017
Warriors Trained364
Total Skips19
Total Code Submissions458
Total Times Completed169
Python Completions169
Total Stars16
% of votes with a positive feedback rating95% of 69
Total "Very Satisfied" Votes64
Total "Somewhat Satisfied" Votes3
Total "Not Satisfied" Votes2
Total Rank Assessments4
Average Assessed Rank
6 kyu
Highest Assessed Rank
5 kyu
Lowest Assessed Rank
7 kyu
Ad
Contributors
  • kingcobra Avatar
  • ZED.CWT Avatar
  • user9644768 Avatar
Ad