Question: ## Problem 2 Write code which, given a list ` L ` , produces a dictionary ` D ` where: - The * keys *
## Problem
Write code which, given a list L produces a dictionary D where:
The keys of D are the unique elements of Lie each element of L appears only once
The value Di is the number of times that i appears in list L
Demonstrate that your code works for lists of strings, lists of integers, and lists containing both strings and integers. its fine to copy and paste your code for this, although if you happen to know how to define functions then you might find that more efficient
For example:
python
L aabc
# your code here
#
D
# output
a : b : c :
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
