Skip to content

Instantly share code, notes, and snippets.

@theriley106
Last active January 20, 2018 22:49
Show Gist options
  • Save theriley106/2f30d66ae952bd9d9e0bdaeccf3b2a57 to your computer and use it in GitHub Desktop.
Save theriley106/2f30d66ae952bd9d9e0bdaeccf3b2a57 to your computer and use it in GitHub Desktop.
import csv
stores = {}
with open('Database.csv', 'r') as f:
reader = csv.reader(f)
your_list = list(reader)
for line in your_list:
stores[line[0]] = line[1]
while True:
ip = raw_input('Store Number: ')
try:
print(stores[ip])
except:
print("Not a Store")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment