Question: python Given a list of strings, return a dictionary containing a key for every different string in the list, and the value is that string's
Given a list of strings, return a dictionary containing a key for every different string in the list, and the value is that string's length. problem_eleven (["a", "bb", "a", "bb"]) { "bb": 2, "a": 1} problem_eleven(["this", "and", "that", "and"]) { "that": 4, "and": 3, "this": 4} problem_eleven (["code", "code", "code", "bug"]) { "code": 4 , "bug": 3} def problem_eleven(string_list): \# code goes here: return dictionary
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
