Question: Python pls Create a function name word_by_me function, this function will take a dictionary and returns a dictionary that contain word and inner dictionary with

Python pls

Create a function name word_by_me function, this function will take a dictionary and returns a dictionary that contain word and inner dictionary with the name and numbers

Input = {

'Ceaser': [('Indo', 30, 40), ('Death' , 20, 50), ('Indo',-10, 60), ('Apron', 20, 55)],

'Baily': [('Indo', 20, 40), ('Indo',-10, 45), ('Iron', 40, 30), ('Indo',-10, 35)],

'Aaron': [('Indo', 20, 10), ('Death', 10, 50), ('Apron', 80, 80), ('Death', -10, 55)],

'Duke': [('Apron', 40, 80), ('Apron', 40, 85), ('Apron',-40, 90)] }

output = {

'Indo': {'Ceaser': [(30,40), (-10,60)], 'Baily': [(20,40), (-10,45), (-10,35)], 'Aaron': [(20,10)]},

'Death': {'Ceaser': [(20,50)], 'Aaron': [(10,50), (-10, 55)]},

'Apron': {'Ceaser': [(20,55)], 'Aaron': [(80,80)], 'Duke': [(40,80), (40,85), (-40,90)]},

'Iron': {'Baily': [(40,30)]} }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!