Write the import and code so:
dumpsandloadsare pulled directly out ofjson(from json import dumps, loads) — only import what you actually use.- The script encodes the dict
{"city": "boston"}to a JSON string withdumps, then decodes it back to a dict withloads, and prints the decoded city.
Expected output:
boston