Question: SOLVE IN PYTHON Program A Concatenate the following dictionaries to create a new one. If a key repeats across the three dictionaries, you have to
SOLVE IN PYTHON
Program A Concatenate the following dictionaries to create a new one. If a key repeats across the three dictionaries, you have to add the values corresponding to the key. dicl (1:10, 2:20) dic2-1:20, 3:30, 4:40 dic3 15:50,6:60,3:60 Expected result: 1: 30, 2: 20, 3: 90, 4: 40, 5: 50, 6: 60) Program B Write a Python program to create a dictionary from a string that lists each character in the string along with the number of times that character appears in that string. Sample string: 'baruch college' Expected output: {'b": 1, ": 1, 'r': 1, 'u,: 1,'c': 2, 'h": 1,' ': 1, 'o': 1, 'I": 2,'e': 2, 'g": 1}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
