Is there python code that can make one xbee to receive sensor data from another, wireless?
There are send and receive examples but you would need to add an external protocol to do what you want. That is, you would need to create a protocol that says, when I receive X, do y.
Can you guide me to the examples, that you mentioned?
Launch your PyCharm application. Choose File from the top menu, then select New XBee Micro Python Application Project, Select the XBee you are working with, It should be listed.