Aliases, multi-imports, and the `np.` you'll see everywhere — step 8 of 9
Write the imports and code so:
jsonis imported normally (no alias)dumpsandloadsare pulled out ofjsondirectly (from json import ...)- 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
⌘↵ runs the editor.read, then continue.
Write the imports and code so:
jsonis imported normally (no alias)dumpsandloadsare pulled out ofjsondirectly (from json import ...)- 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
this step needs the editor
on desktop today; in the app (coming soon). save your spot and we'll bring you back here when you're ready.