How do I create a python code that distinguishes between the capital of a state and the state that the capital has?

import re
data = open("state_capitals.csv").read()
state_name = raw_input("Enter State Name:")
print re.findall(".*%s.*"%(state_name,),data,re.I)

probably

Leave a Comment