Basically I have created a dictionary in python, say

```
dictionary = {'test': [1, 2, 3], 'other': [100]} 

```

but I want to now write a program that would generate a dict file(say file1.dict) containing the dictionary and a idx file(say file2.idx) containing its inverted index posting.