Question: (Python) Given a list of strings, return a dictionary containing a key for every different string in the list, always with the value 0. For
(Python) Given a list of strings, return a dictionary containing a key for every different string in the list, always with the value 0. For example the string "hello" makes the pair "hello":0.
# # problem_ten(["a", "b", "a", "b"]) {"a": 0, "b": 0}
# problem_ten(["a", "b", "a", "c", "b"]) {"a": 0, "b": 0, "c": 0}
# problem_ten(["c", "b", "a"]) {"a": 0, "b": 0, "c": 0}
def problem_ten(string_list):
return dictionary
# note i need the above return
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
