← 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}))
- A.{'ok': True}
- B.{"ok": true}
- C.ok
- 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 →