Read dictionary from file into original lists
Read dictionary from file into original lists Question: I have one nested list, and one list for "numbers" test_keys = [["tobbe", "kalle"],["karl", "Clara"],["tobbe"],["tank"]] test_values = [‘123’, ‘234’,’345′,’456′] res = {} for key in test_keys: for value in test_values: res[value] = key test_values.remove(value) break with open("myfile.txt", ‘w’) as f: for key, value in res.items(): f.write(‘%s;%s;n’ % …