Q:

Write a Python program to access only unique key value of a Python object

0

Write a Python program to access only unique key value of a Python object

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

import json
python_obj = '{"a":  1, "a":  2, "a":  3, "a": 4, "b": 1, "b": 2}'
print("Original Python object:")
print(python_obj)
json_obj = json.loads(python_obj)
print("\nUnique Key in a JSON object:")
print(json_obj) 

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now