]> projects.mako.cc - babynames-cdsw/blob - ssadata.py
6fabb39a25a97931059e16d9845b53ef3efa8d11
[babynames-cdsw] / ssadata.py
1 NAMES_LIST = "yob2018.txt"
2
3 boys = {}
4 girls = {}
5
6 for line in open(NAMES_LIST, 'r').readlines():
7     name, gender, count = line.strip().split(",")
8     count = int(count)
9
10     if gender == "F":
11         girls[name.lower()] = count
12     elif gender == "M":
13         boys[name.lower()] = count

Benjamin Mako Hill || Want to submit a patch?