Input = [
{"subject" : "Hello", "message": "World"},
{"subject" : "Hello", "message": "Stranger!"},
{"subject" : "Hello", "message": "Stranger!"},
{"subject" : "Welcome", "message": "Python"}
]
Output:
{'Hello': ['World', 'Stranger!', 'Stranger!'], 'Welcome': ['Python']}
{"subject" : "Hello", "message": "World"},
{"subject" : "Hello", "message": "Stranger!"},
{"subject" : "Hello", "message": "Stranger!"},
{"subject" : "Welcome", "message": "Python"}
]
Output:
{'Hello': ['World', 'Stranger!', 'Stranger!'], 'Welcome': ['Python']}
No comments:
Post a Comment