Ask Question

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. 9 July, 22:35
    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 & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers