Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bslatkin/effectivepython
/ add
Method
add
example_code/item_027.py:77–79 ·
view source on GitHub ↗
(self, country, city)
Source
from the content-addressed store, hash-verified
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
82
print(
"Example 4"
)
Callers
5
item_056.py
File · 0.45
item_022.py
File · 0.45
item_027.py
File · 0.45
fake_get
Function · 0.45
item_071.py
File · 0.45
Calls
no outgoing calls
Tested by
no test coverage detected