Skip to content
Quiz · Modules, files and generators · lesson 6 of 12

Quiz — a JSON round trip

What does the program print?

Python
import json

data = {"id": 1, "tags": ("a", "b")}
back = json.loads(json.dumps(data))
print(back["tags"], back == data)

Subscribe to take the course

The course is free. Sign in with Telegram and subscribe to the channel to open every lesson.

Sign in another way