dc217e78adc5e362013ea8df31f462b92470f2a8
[babynames-cdsw] / ssadata.py
1 NAMES_LIST = "yob2013.txt"
2
3 boys = {}
4 girls = {}
5
6 for line in file(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?