file = open("dictionary_string.txt", "r") contents = file.read() dictionary = ast.literal_eval(contents) file.close()