Session 4: Contact Manager - Part 1
How Imports Work
Option 1: Import the whole module
import json
json.dump(data, file)
json.load(file)
Why the json. prefix? Tells Python where the function comes from!
Option 2: Import specific things
from json import dump, load
dump(data, file)
load(file)
Trade-off: Shorter to type, but less clear where it came from.