Basically I have two raspberry pi's and I want one to publish data obtained from a dictionary in a python file and the the other to subscribe to this dictionary data.  Apologies if this is a very bland question but I can't find any info on the internet regarding this.
I would recommend you read a basic MQTT tutorial if you have not done that already. That will help you decide what your topics and data should be like.
To get you started, here is an example of how you could publish and subscribe for your use case.
The publisher could iterate through the keys in the dictionary and publish data to topic "keys/$key_name" with the message being the value for that key in the dictionary.
The subscriber could subscribe to topic "keys/#". This way the subscriber will get all the keys and the corresponding data and reconstruct the dictionary.
There are many more ways you could publish data depending on the nature of data in your dictionary.
How does one send data from a dictionary over an mqtt broker