Ask Question
2 March, 19:05

The function below takes a single input, containing list of strings. This function should return string containing an HTML unordered list with each of in_list strings as a list item. For example, if provided the list ['CS 105', 'CS 125', 'IS 206'], your function should return a string containing the following. The only whitespace that is important is those contained in the given strings (e. g., the space between CS and 105).

+1
Answers (1)
  1. 2 March, 20:50
    0
    The following code will be used to calculate the given requirement.

    Explanation:

    This function will return string containing an HTML unordered list with each of in_list strings as a list item

    def make_html_unordered_list (in_list):

    result = '/n'

    for item in in_list:

    result + = ' ' + item + ' / n'

    return result + ''

    # Testing the function here. ignore/remove the code below if not required

    print (make_html_unordered_list (['CS 105', 'CS 125', 'IS 206']))

    Note: The only whitespace that is important is those contained in the given strings.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “The function below takes a single input, containing list of strings. This function should return string containing an HTML unordered list ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers