Skip to content

Commit

Permalink
Create states_enumerate.py
Browse files Browse the repository at this point in the history
  • Loading branch information
shannonturner committed Mar 22, 2014
1 parent 5a0070e commit 9b2f9d3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions section_07_(files)/states_enumerate.py
@@ -0,0 +1,9 @@
with open("states.csv", "r") as states_file:
states = states_file.read().split("\n")

for index, state in enumerate(states):
states[index] = states[index].split(",")

print "{0}'s abbreviation is {1}".format(states[index][1], states[index][0])

# print states

0 comments on commit 9b2f9d3

Please sign in to comment.