Skip to content

Commit

Permalink
Simplify for loop
Browse files Browse the repository at this point in the history
  • Loading branch information
frewsxcv committed Jan 13, 2015
1 parent 3809317 commit 3f3b89f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apply-us-data.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
counties[(row['State FIPS'], row['Name'][:-13])] = value

# more key variations
for ((s, c), value) in list(counties.items()):
for (s, c), value in counties.iteritems():
if c.startswith('St. '):
counties[(s, 'Saint '+c[4:])] = value

for ((s, c), value) in list(counties.items()):
for (s, c), value in counties.iteritems():
counties[(s, c.lower())] = value
counties[(s, c.replace('-', ' '))] = value
counties[(s, c.replace('-', ' ').lower())] = value
Expand Down

0 comments on commit 3f3b89f

Please sign in to comment.