Question: Write a function called ` data _ to _ dictionary ` that converts the data into a dictionary such that: 1 . There is a
Write a function called datatodictionary that converts the data into a dictionary such that:
There is a single key for each character in Hamilton.
The value corresponding to each key is a list of the characters to which that key links. The list should contain repeats if there are multiple links.
Here's an example of the desired behavior on a fake data set.
python
data ab
ab
ac
bc
ba
datatodictionarydata
# output
a : bbcb : ac
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
