Skip to content

Instantly share code, notes, and snippets.

@beltiras
Forked from gunnarig/ppp.py
Last active October 8, 2018 15:51
Show Gist options
  • Save beltiras/c16616196dd068e0fdb428ab9be9e754 to your computer and use it in GitHub Desktop.
Save beltiras/c16616196dd068e0fdb428ab9be9e754 to your computer and use it in GitHub Desktop.
def get_word_string(user_file):
user_file = open(user_file,"r")
states = {}
#wordString = '' # start with an empty string of words
lines = user_file.readlines()
header = lines[0].split(",")
for line in lines[1:]:
items = line.split(",")
states[items[0]] = dict(zip(header[1:], items[1:])))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment