🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Modules and Libraries: all 14 questions

Quiz: Modules and Libraries · Question 9 of 14

What does this print? (code)

What does this print?

import json
print(json.dumps({"ok": True}))
  1. A.{'ok': True}
  2. B.{"ok": true}
  3. C.ok
  4. D.An error
Answer & explanation

Correct answer: {"ok": true}

JSON uses double quotes and lowercase true.

Can you get the rest right without peeking?

Take the timed Quiz: Modules and Libraries quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →