MCPcopy Create free account
hub / github.com/bslatkin/effectivepython / Visits

Class Visits

example_code/item_027.py:73–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71
72print("Example 3")
73class Visits:
74 def __init__(self):
75 self.data = {}
76
77 def add(self, country, city):
78 city_set = self.data.setdefault(country, set())
79 city_set.add(city)
80
81
82print("Example 4")

Callers 1

item_027.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected