python - opening and implementing a txt file into a Dictionary -
i having problems following lines of code:
dictionary = {} open("text docs/clues.txt", "r") l: l in clues: dictionary[l[0]] = dictionary[l[1]]
getting error says:
(file location), line #, in function l in clues: nameerror: global name 'clues' not defined
you not iterating on file object, meant:
dictionary = {} open("text docs/clues.txt", "r") l: line in l: ...
Comments
Post a Comment