Question: Python Given a list of strings, return a dictionary where each different string is a key and its value is true if that string appears
Given a list of strings, return a dictionary where each different string is a key and its value is true if that string appears 2 or more times in the list. Example runs: \# problem_sixteen (["a","b","a","c","b"]){ "a": true, "b": true, "c": false } \# problem_sixteen ([c ", "b", "a" ]){ " a ": false, "b": false, "c": false } \# problem_sixteen (["c","c","c","c"]){ "c": true } def problem_sixteen(string_list): \# Problem 16 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
